Jump to content

Webhosting mail server problem?


monicao

Recommended Posts

Hello! I have an e-shop: after one user sent a purchase order from my site, I have to receive an e-mail from server with that purchase order. The problem is that I don't receive all the purchase orders sent by all users! I don't know if it is my fault or my webhosting mail server is not properly set. You can see below my PHP code for sending the purchase order to me:

 

$headers="MIME-version:1.0\r\nContent-type: text/html; charset=iso-8859-2\r\n";
mail("$myemail","$subject","$message","From: $name <$mail>\nContent-type:text/html");

 

Is my email code wrong? Or I have to change my webhost?

 

I need an advice, thankyou, Monica

Link to comment
Share on other sites

Why is this in the comments/suggestions section?

 

Try setting it into a variable:

$headers="MIME-version:1.0\r\nContent-type: text/html; charset=iso-8859-2\r\n";
$sent = mail("$myemail","$subject","$message","From: $name <$mail>\nContent-type:text/html");
if (!$sent) {
  exit('E-mail could not send, there was an error. Please try again.');
}

 

But you also don't use the '$headers' variable, you should plug it in if you're wanting to add those specific headers.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.