Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't send email through openshift

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.

like image 365
aagam94 Avatar asked Apr 14 '14 16:04

aagam94


1 Answers

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!

like image 162
aagam94 Avatar answered Oct 22 '22 09:10

aagam94