sc_mail_send setup

It it require special setup to use the sc_mail_send macro ?

I created a PHP button to execute e-mail transfer with the following code:

$message = "Hello <b> TEST </b>, ";
$message .= “<br><br>”;
$message .= “below follows the message sent by the user <b>TEST</b>.”;
$message .= “<br><br><br>”;
$message .= “<hr>”;
$message .= “<br />”;
$message .= “test test test test”;
$message .= “<br><hr>”;

sc_mail_send(“smtp.abcd.com”,
‘almond’,
‘password’,
almond@abcd.com”,
almond@abcd.com”,
almond@abcd.com”,
almond@abcd.com”,
“H”, “” , “”, “25”, “N”, “”);

if ({sc_mail_ok}) {
sc_alter(‘Message sent successfully!’);
} else {
sc_error_message(“There was a problem in sending! Please contact the System
Administrator through telephone (xx) xxxx-xxxx.”);
}

When executed under SC8, it show:
Fatal error: Uncaught exception ‘Swift_TransportException’ with message ‘Failed to authenticate on SMTP server with username “almond” using 1 possible authenticators’ in …

The password is valid.

On production environment, the screen become blank after click the confirmation message.

Is there any special requirement for the sc_mail_send to work, such SMTP server ?

Regards,

Almond Wong

This is what I’m using and it works great. You can enter in as many “to:” addresses as you wish separated by a “;”

// SMTP Settings
[glo_smtp] = ‘mail.companysmtp.com’;
//$config[‘smtp’][‘smtpauth’] = 1;
//$config[‘smtp’][‘smtpsecure’] = ‘’;
//$config[‘smtp’][‘port’] = 587;
[user] = ‘notify@companysmtp.com’;
[glo_pw] = ‘smtpmailpsw’;
[from]=‘sendsample@mail.com’;
[to]=$Temail;
[glo_copias]=‘sample1@mail.com’;
{attached}=’’;
[subject]=‘Sample subject’;
$msg = $firstname." “.$lastname.” - <br><br>";
$msg .= “sample message:<br>”;
$msg .= “Login: " . $samplelogin.” <br>Password: “.$samplepsw.”<br><br><br>";
$msg .= "message sample thanks. “<br><br><br><br>”;
[message]=$msg;
sc_mail_send([glo_smtp], [user], [glo_pw], [from], [to], [subject], [message], ‘H’, [glo_copias], ‘BCC’, ‘587’, ‘N’, ‘’);

Thanks for reply.

If i use PHP mail(), e-mail can sent on production and development environment.

About the port no., is it a must to use ‘587’ ? I currently using 25.

Regards,

Almond Wong