Asmondien Posted August 22, 2013 Share Posted August 22, 2013 Hi, I have contact form on my website, and I use SMTP php to send emails and my server instead of mail().function. All works well, however. As it's sending the email. It keeps sending from my Gmail account to my Gmail account. Is there way I can say in the code that "from" is from else where, but use gmail details to authenticate? $smtp = Mail::factory('smtp', array( 'host' => 'ssl://smtp.gmail.com', 'port' => '465', 'auth' => true, 'username' => 'myemail@gmail.com', 'password' => 'supersecretpwrd' )); $from = 'THE website@tosenditfrom.co.uk'; $to = 'myemail@gmail.com'; $subject = "You don't want to know"; Okay, I have that code. When I change the $from = it's still show from my email address. Any suggestion? With out making new email address Thanks Quote Link to comment https://forums.phpfreaks.com/topic/281463-smtp-email/ Share on other sites More sharing options...
Muddy_Funster Posted August 22, 2013 Share Posted August 22, 2013 I suggest you stop trying, basic spam filter checks include matching the senders (From) address to the domain that it was sent from, so sending a mail through yourname123@gmail.com and trying to masquerade as yourname@somedomain.com will, in most cases, get your message dumped before it gets where it wants to be. Quote Link to comment https://forums.phpfreaks.com/topic/281463-smtp-email/#findComment-1446282 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.