---
schema_version: "1"
id: f43b052c5b2bc79ec9dfb1e0e54363643443b70b98dc6af3c078f197ab79f993
title: Add Attachments to an Email Using the Script API's dw.net.Mail Class
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/b2c_rn_25_9_dw_net_mail.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.b2c_rn_25_9_dw_net_mail.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 0e7d62c181e166a4f835c9a1d1c2c79ff95d1ca1015dd6f8cc8156969cda5291
description: With the new addAttachment(dw.io.File file) method, you can easily add one or more attachments to an outgoing email. Previously, this class did not provide a way to add attachments to emails.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Add Attachments to an Email Using the Script API's dw.net.Mail Class

With the new addAttachment(dw.io.File file) method, you can easily add one or more attachments to an outgoing email. Previously, this class did not provide a way to add attachments to emails.

**Where:** This change applies to B2C Commerce.

#### See Also

- [Class Mail](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/upcoming/scriptapi/html/api/class_dw_net_Mail.html)