Home > Uncategorized > Send #Email with Attachments from #Javascript

Send #Email with Attachments from #Javascript

logo

We’ve made a few updates to SMTPJS.com –

  1. We now allow attachments, so you can get your Javascript to include an attachment with the email;
     

    use sendWithAttachment:

    Email.sendWithAttachment(
        "from@you.com",
        "to@them.com",
        "Subject",
        "Body",
        "host.yourisp.com",
        "username",
        "password",
        "http://url-where-your-attachment-file-is-stored");
  2. We now assume your SMTP server supports SSL. If it doesn’t … it should! 🙂
  3. We’ve secured all client-server communications using HTTPS for added security.
  4. We now use CORS for client-server communication, which currently has 95.33 % browser coverage.
Advertisements
Categories: Uncategorized
  1. Leon
    December 19, 2017 at 2:19 am

    Hi, it is a great tool!
    I want to know that how to send a mail which has multiple attachments?
    Thanks in advance.

  2. Leon
    December 19, 2017 at 6:44 am

    Hi this is a great tool!
    I want to know that how to send a mail which has multi-attachments?
    Thanks in advance.

  3. December 19, 2017 at 7:17 am

    Hi this is a great tool!

    I want to know how to send email with multiple attachments?

    Thanks in advance.

  4. guruprasaad D
    February 15, 2018 at 4:33 pm

    How do I attach the files from local storage which needs to send over the mail?
    Enlighten me.

  5. August 24, 2018 at 2:09 pm

    Currently attempting to send with data uri,
    the data uri seems valid, I’ve checked it with a decoder and it seems to work.

    I call via:

    Email.sendWithAttachment(
    from_email,
    to_email,
    “This is a subject”,
    “this is the body”,
    smtp_server,
    smtp_uname,
    smtp_pwd,
    datauri,
    function (msg) {console.log(msg)}
    );

    and I’ve used the exact same setup sans datauri to successfully send an email with Email.send.

    Any thoughts?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: