PHPmailer gmail 'from' is gmail account

后端 未结 2 1148
孤城傲影
孤城傲影 2020-12-11 09:47

I\'m trying to send a mail with PHPmailer and gmail. But when I send a mail its from my gmail account instead of no-reply. How do I set no-reply as from?

Code I have

2条回答
  •  不知归路
    2020-12-11 09:56

    You can't do it. Just imagine sending mail prompting to reply with your bank account credentials from an address validation@yourbank.com.

    To have no-reply address you must have an access to the mail server in @your.domain (not gmail) and create such account there, then send emails using this account.

提交回复
热议问题