I'm trying to use PHP to send a response when needed from my website with the appropriate company email address and keep getting errors. Originally the emails were not authenticated but then certain users where not receiving them. I've since tried added authentication and still no luck. I put the code below and the errors.
I've also tried port 465 which is the alternate smtp port provided by the hosted exchange service. I've verified smtp relay is active. I've also verified I'm getting a response by telneting to both ports of my smtp server.
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "my.mail.server:25"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "email@example.com"; // SMTP username
$mail->Password = "mypassword"; // SMTP password
$mail->From = "firstname.lastname@example.org";
$mail->FromName = "Me";
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
SMTP Error: Could not authenticate. Message could not be sent.
Mailer Error: SMTP Error: Could not authenticate.
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing.
Set up your basic HTML file. Open your form tag and set the method and action attributes.:
Set up your first few inputs one for the name and …