Hi, anyone knows how to send email with high importance flag in scriptcase?
Thank you.
Hi, anyone knows how to send email with high importance flag in scriptcase?
Thank you.
In [SIZE=15px]PHP mail() you would use the following:
Code:[/SIZE]
<?php $headers = "MIME-Version: 1.0
" ; $headers .= "Content-Type: text/html; charset=“iso-8859-1”
"; $headers .= "X-Priority: 1 (Highest)
"; $headers .= "X-MSMail-Priority: High
"; $headers .= "Importance: High
"; $status = mail($to, $subject, $message,$headers); ?> [SIZE=15px]Hope this helps.
Dr Tim[/SIZE]
Thank you for the response, Dr Tim. I tried but it seems the server isn’t configured php mail correctly.
However, I went a different route with this and managed to piggyback on scriptcase swiftmailer
This is what I did using a blank application:
include_once($this->Ini->path_third . "/swift/swift_required.php");
$sc_mail_port = "25";
$sc_mail_tp_port = "N";
$sc_mail_tp_mens = "H";
$sc_mail_tp_copy = "";
$mail_subject = "Piggyback swiftmailer";
$mail_message = "Message for testing with high priority";
$Con_Mail = Swift_SmtpTransport::newInstance("your.smtp.server", $sc_mail_port);
$Con_Mail->setUsername("");
$Con_Mail->setpassword("");
$Send_Mail = Swift_Mailer::newInstance($Con_Mail);
$Mens_Mail = Swift_Message::newInstance($mail_subject)->setBody($mail_message)->setContentType("text/html");
$Mens_Mail->setPriority(2);
$Mens_Mail->addTo("john@doe.com", "John Doe");
$Send_Mail->send($Mens_Mail->setFrom("no-reply@doe.com", "web admin"), $Err_mail);
Thanks for the update