Jump to content

[SOLVED] Authen


cbrooks

Recommended Posts

Yes, this is another Authenticated SMTP Mail question!

 

I am running a a Vista Windows system using WAMPServer (Apache 2.2.11 and PHP 5.3.0)

 

I am using the following code to try to get this to work, it always says that the message was sent, but it never arrives. I have tried sending to several friends with the same result. I have doubled checked the $host and $port values and they are correct.

 

Any suggestions will be appreciated!

 

<code>

<?php

include("Mail.php");

/* mail setup recipients, subject etc */

$recipients = "[email protected]";

$headers["From"] = "[email protected]";

$headers["To"] = "[email protected]";

$headers["Subject"] = "User feedback";

$mailmsg = "Hello, Please take a moment to reply to this test for me!";

/* SMTP server name, port, user/passwd */

$smtpinfo["host"] = "smtp.att.yahoo.com";

$smtpinfo["port"] = "465";

$smtpinfo["auth"] = true;

$smtpinfo["username"] = "anyoneelse";

$smtpinfo["password"] = "itshidden";

/* Create the mail object using the Mail::factory method */

$mail_object =& Mail::factory("smtp", $smtpinfo);

/* Ok send mail */

$mail_object->send($recipients, $headers, $mailmsg);

//$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail_object)) {

  echo("<p>" . $mail_object->getMessage() . "</p>");

} else {

    echo("<p>Message successfully sent!</p>");

  }

?>

</code

Link to comment
https://forums.phpfreaks.com/topic/179646-solved-authen/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.