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; } ?> Quote 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* Quote 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* Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.