1

I hosted my web in ipage web hosting. I want to make my web send an automatic email reply after filling a form, but the email is not working. I use a simple mail function like this:

mail($to,$mail_subject,$mail_content, null, '-f'.$from);

The strange thing is, if I use a dummy email addres for $from (I use webmaster@web.com) and use only single line $mail content, it worked. If I use the original email address from and the mail content from variable I set with PHP, it doesn't work. Can somebody help me?

Bharata
  • 685
  • 3
  • 11
  • 23
  • Why not use `"From: $from"` in the `headers` argument? – Barmar Apr 19 '15 at 10:30
  • I have tried that, but it didn't work. I googled the problem and found out using -f is useful. I found out it is working now but the problem came from another place now. – Bharata Apr 19 '15 at 11:39

1 Answers1

0

To send email using php mail() function from Ipage and some other hosting provider like "bigrock","1&1" you have to use a email Id of your own domain either in the sender/receiver list.

I am using the php mail function mail($to,$subject,$message,$headers); It is working fine in iPage hosting.

  • What do you mean with email Id of my own domain? I use the $from address using my domain is not working and it is only work if I use that dummy email address. That's why I'm confused now. – Bharata Apr 19 '15 at 11:41
  • If your domain name which is hosted in iPage is " yourdomain.com" then use one email Id (Not necessary to create,But advisable to create an email Id) dont-reply@yourdomain.com (Or any Email Id). Use that email id either in $from or use in $to(as one recipient). – Pravat Kumar Sahoo Apr 19 '15 at 16:31
  • I tried PHPMailer library using SMTP provided by ipage server. It said message sent but I never receive my email. How should I check this? – Bharata Apr 21 '15 at 15:06