$sql = "SELECT * FROM NewsletterSubscribers";
$result = mysql_query($sql, $con);
while ($row = mysql_fetch_array($result)){
$to = $row['Email'];
mail($to, $emailName, $letter);
}
I would be grateful for any help
2 replies to this topic
#1
Posted 12 September 2011 - 11:52 AM
Hi, i can't figure out, how to make mail function work. It just does not send any letters. All parfemeters passed to function are initialized. My code is here:
|
|
|
#2
Posted 12 September 2011 - 10:07 PM
If you are on unable to send mail, then you will need to verify you have a mail transport agent set up with PHP and that it is functioning, with a mail server you can connect to.
If you are on a shared hosting provider, it is likely an issue with them and you will need to contact them through support. If you are on a virtual server or on a local machine you will need to download an MTA yourself, such as sendmail, and set this up to speak to a mail server. You can relay mail through your ISP mail server, or gmail for example.
More context would be helpful on your situation.
If you are on a shared hosting provider, it is likely an issue with them and you will need to contact them through support. If you are on a virtual server or on a local machine you will need to download an MTA yourself, such as sendmail, and set this up to speak to a mail server. You can relay mail through your ISP mail server, or gmail for example.
More context would be helpful on your situation.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 13 September 2011 - 10:49 AM
Have you checked the mail() function, taken out of the context you have put it in? Try putting in actual values, rather than values returned from your database. If it works then, you know the errors is somewhere else. If it doesn't, you know it might be a problem as Alexander outlined above.
My Company - My Homepage - My Twitter - My Google+ - My LinkedIn
"Things don’t have to change the world to be important.” - Steve Jobs
"Things don’t have to change the world to be important.” - Steve Jobs
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









