This topic is locked

rmail not working

8/27/2022 12:33:57 AM
PHPRunner General questions
P
paulo author

// ** Send HTML email ****

$msg="<b>Hello there</b>
Best regards";
$subject="Sample subject";
$attachments = array();

$message="Hello there\nBest regards";
$subject="Sample subject";

$globalSettings["useBuiltInMailer"] = false;
$globalSettings["useCustomSMTPSettings"] = true;
$globalSettings["strSMTPUser"] = "email";

$globalSettings["strSMTPServer"] = "hostname";

$globalSettings["strSMTPPort"] = "465";

$globalSettings["strSMTPPassword"] = "password";

$globalSettings["strFromEmail"] = "email";

$globalSettings["SMTPSecure"] = "ssl";

$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $message));

//$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'htmlbody' => $msg, 'from'=>$from, 'attachments' => $attachments));
// Put your code here.
if(!$ret["mailed"])
echo $ret["message"];

Sergey Kornilov admin 9/1/2022

This code doesn't make much sense on its own, you do not say what event is this, you do not specify $email variable anywhere, you do not tell what error message is producedproduced.

If you need help, you need to provide as much info as possible.

P
paulo author 9/2/2022

on $email i have set the email to which i am sending
on $from i set the origin mail

i have placed the event on a button
error is
SMTP Error: Could not connect to SMTP host.[]

usually i need to place authentication as plain but i don“t see where to place it

Sergey Kornilov admin 9/8/2022

If you want help from support with this issue - upload your project to the Demo Account and contact support directly sending the URL of your project on Demo Account.