Can't send email through openshift

2019-02-01 12:56发布

I have website hosted at OpenShift. I tried to send mail using mail function of php. It just returned true, but no mail is received to whom I had sent. Please tell me procedure for sending the mail.

I searched a lot but none of the options worked.

1条回答
别忘想泡老子
2楼-- · 2019-02-01 13:23

After searching alot I came up with the following solution:

Step 1: Create account on mailgun and add your OpenShift application url.

Step 2: Download the PhpMailer library from here and add it to your php folder

Step 3: Go through this sample example

Step 4: Replace username and password with the credentials you got after adding domain to mailgun.

Step 5: Done!

查看更多
登录 后发表回答