shedokan Posted December 12, 2007 Share Posted December 12, 2007 When I send the mail it uses my gmail username as "From:". here's my script: <?php require("class.phpmailer.php"); $mailer = new PHPMailer(); $mailer->IsSMTP(); $mailer->Host = 'ssl://smtp.gmail.com:465'; $mailer->SMTPAuth = TRUE; $mailer->Username = '[email protected]'; // Change this to your gmail adress $mailer->Password = 'pass'; // Change this to your gmail password $mailer->From = "[email protected]"; $mailer->FromName = "Test"; // This is the from name in the email, you can put anything you like here $mailer->Subject = "Test"; $mailer->Body = " name: Test <br> E-Mail: [email protected] <br> <div style='width:75%;'> <center>-----------------------------------------------------------------------------<br> Test <br>-------------------------------------------------------------------------------------------------</center><br> It's just a test. <br><center>-------------------------------------------------------------------------------------------------<br></center> </div> "; $mailer->CharSet = 'utf-8'; $mailer->AddAddress("[email protected]"); if(!$mailer->Send()) { echo "Message Sent<br/ >"; echo "Error: " . $mailer->ErrorInfo; } ?> Link to comment https://forums.phpfreaks.com/topic/81395-why-does-phpmailer-uses-my-username-as-from-who-i-got-the-mail/ Share on other sites More sharing options...
shedokan Posted December 12, 2007 Author Share Posted December 12, 2007 *bump* Link to comment https://forums.phpfreaks.com/topic/81395-why-does-phpmailer-uses-my-username-as-from-who-i-got-the-mail/#findComment-413127 Share on other sites More sharing options...
shedokan Posted December 14, 2007 Author Share Posted December 14, 2007 *bump* Link to comment https://forums.phpfreaks.com/topic/81395-why-does-phpmailer-uses-my-username-as-from-who-i-got-the-mail/#findComment-414791 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.