Jump to content

SMTP Email


Asmondien

Recommended Posts

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' => '[email protected]',
        'password' => 'supersecretpwrd'
    ));


$from = 'THE [email protected]';
$to = '[email protected]';
 $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

Link to comment
https://forums.phpfreaks.com/topic/281463-smtp-email/
Share on other sites

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 [email protected] and trying to masquerade as [email protected] will, in most cases, get your message dumped before it gets where it wants to be.

Link to comment
https://forums.phpfreaks.com/topic/281463-smtp-email/#findComment-1446282
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.