Send Mail Using Amazon EC2 Instance

前端 未结 4 1583
长发绾君心
长发绾君心 2021-02-03 11:24

I am using Amazon EC2 Instance for one of my project, I have installed LAMP on linux server and now while I am trying to send email using simple function it is not sending email

相关标签:
4条回答
  • 2021-02-03 12:07

    If you are using AWS SES you need to make sure you validate the account first:

    http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html

    With the exception of addresses containing labels (see below), you must verify each email address that will be used as a "From" or "Return-Path" address for your messages. The entire email address is case-sensitive. For example, if you verify sender@example.com, you cannot send emails from sender@EXAMPLE.com unless you verify sender@EXAMPLE.com also. (Domain verification, however, is case-insensitive. For more information, see Verifying Domains in Amazon SES.)

    Until you are granted production access to Amazon SES, you must also verify the email address of every recipient except for the recipients provided by the Amazon SES mailbox simulator. For more information about the mailbox simulator, see Testing Amazon SES Email Sending. For more information about production access, see Requesting Production Access to Amazon SES.

    0 讨论(0)
  • 2021-02-03 12:10

    Although your problem relates to Sendmail have you tried following Amazons Documentation?

    http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp-app.html

    This uses postfix but it seems like a better alternative and there's help readily available for it.

    You also can use SMTP as Amazon SES supports this:

    http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp.html

    I know this doesn't directly answer your question. You might just need to configure the mail settings in php.ini.

    0 讨论(0)
  • 2021-02-03 12:10

    I solved this issue just by installing sendmail in my instance. Just run bellow command in your terminal

    sudo apt-get install sendmail

    That worked for me

    0 讨论(0)
  • 2021-02-03 12:16

    If you are using a amazon ec2 ami/linux distro use "sudo yum install sendmail" while in SSH

    0 讨论(0)
提交回复
热议问题