14

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.

aagam94
  • 613
  • 1
  • 6
  • 20

1 Answers1

17

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!

aagam94
  • 613
  • 1
  • 6
  • 20
  • @aagam94 At step 4, in what file to put the sample example code. (filename) Thanks! – leontalbot Sep 04 '15 at 04:12
  • @leontalbot : You need to put those sample code where you want to send a mail – aagam94 Oct 06 '15 at 03:09
  • I got the message `The domain is unverified and requires DNS configuration. Log in to your control panel to view required DNS records.`. Control panel says I have to config `TXT records`. How to do that in Openshift? – Carcamano Jul 08 '16 at 17:08