This topic is locked

Not sending emails

5/13/2019 2:22:33 PM
ASPRunnerPro General questions
A
admin author

I have a Work Order table with a view table Request Table which adds the record to the Work Order table. I have tried putting the following in After and Before Record Added in both the View table and the Work Order table. If you add a Work Order via the Request View Table, the work order is created, however no email is sent nor error received. If you create a work order from the work order table it is set to open in edit at this point the screen goes blank and you have to close the tab or resubmit it the request. The record is added to the database.
I need to email the company owner when a new work order is added. I will also need to email the customer when the work order is updated. Any help on what the issue is in the code below is greatly appreciated.
/** Send email with new data ****

$email = "akronmiller@pmsindy.com";

$from = "crutch0316@gmail.com";

$subject = "Test New Request Added";

$message = "New Request - TEST"."\r\n";

$message = "Name: ".$values["contact]"]."\r\n";

$message = "Request: ".$values["request]"]."\r\n";

$message = "Priority: ".$values["priority]"]."\r\n";

$arr = runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $message, 'from' => $from));
//if error happened print a message on the web page

if (!$arr["mailed"]) {

echo "Error happened:
";

echo "File: " . $arr["errors"][0]["file"] . "
";

echo "Line: " . $arr["errors"][0]["line"] . "
";

echo "Description: " . $arr["errors"][0]["description"] . "
";

}
I originally had set up with the company email, however followed the email setup provided for gmail to continue to test.
Unable to attach image, the Email settings are below
from email: crutch0316@gmail.com

smtp.gmail.com

465 - SSL

crutch0316@gmail.com

Correct Password
Thanks,
Sandy

admin 5/13/2019

Make sure that two-factor authentication is turned off in Gmail settings.

A
admin author 5/31/2019



Make sure that two-factor authentication is turned off in Gmail settings.


Thanks I have confirmed that two-factor authentication is turned off in Gmail settings.

admin 5/31/2019

It should work if SMTP settings are correct.
If you need us to take a closer look post your project to Demo Account and contact support team directly.

lefty 6/3/2019



It should work if SMTP settings are correct.
If you need us to take a closer look post your project to Demo Account and contact support team directly.


Just Noticed this is ASPrunner Forum. You have incorrect line break setup . Use

ASP Runner Mail
[font="Verdana, Geneva, Arial, sans-serif"][size="2"]msg = msg & "Name : " & values("name") & vbcrlf[/size]