How to send email with 2 attachments using sc_mail_send macro?

I want to send and email with multiple attachments using sc_mail_send. How can i do it?

Re: How to send email with 2 attachments using sc_mail_send macro?

Hello,

Did you check in the Insert Code the example ?
Like this :

/**

  • Send an email with attachment
    */

// Email parameters
$mail_smtp_server = ‘smtp.example.com’; // SMTP server name or IP address
$mail_smtp_user = ‘login’; // SMTP user name
$mail_smtp_pass = ‘password’; // SMTP password
$mail_from = ‘me@example.com’; // From email
$mail_to = ‘you@example.com’; // To email
$mail_subject = ‘Test message’; // Message subject
$mail_message = ‘This is a test message.’; // Message body
$mail_format = ‘T’; // Message format: (T)ext or (H)tml
$mail_attachments = array( // List of attached files (located on the web server)
‘/path_to_file/attached_file.txt’,
);

// Send email
sc_mail_send($mail_smtp_server,
$mail_smtp_user,
$mail_smtp_pass,
$mail_from,
$mail_to,
$mail_subject,
$mail_message,
$mail_format,
‘’,
‘’,
‘’,
‘’,
$mail_attachments);

Re: How to send email with 2 attachments using sc_mail_send macro?

thx a lot i miss that atachments is an array and i was thinking that i can send only one attachment :slight_smile: