Welcome Guest ( Log In | Register)



 
Closed TopicStart new topic
> Sending PHP mail with mail() function issue, mail function
galexcd
post Jun 23 2006, 06:30 PM
Post #1


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********

Group: [HOSTED]
Posts: 1,020
Joined: 25-September 05
From: L.A.
Member No.: 12,251



I have pretty much deleted a page with over 700 lines of code in it trying to find what was wrong with it, and it still wont work. I also tried on a new page.

mail("my email", "Test", "Test");

DOSNT WORK!!!

mail("my email", "Test", "Test","From: my email@myhost.com);

DOSNT WORK!!!

if(mail("my email", "Test", "Test"))
{
echo "it worked";
}

RETURNS "it worked", BUT IT STILL DOSNT WORK!!!

WHAT THE HELL IS WRONG.. IM ABOUT TO KILL MYSELF mad.gif mad.gif mad.gif AHHHHHHHHHH!!!!!
Go to the top of the page
 
+Quote Post
galexcd
post Jun 23 2006, 10:43 PM
Post #2


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********

Group: [HOSTED]
Posts: 1,020
Joined: 25-September 05
From: L.A.
Member No.: 12,251



There is another site owner who was suspended for too many outgoing emails:

http://www.trap17.com/forums/index.php?s=&...ndpost&p=247070

He was only using it for account verifications, I am sending mail for account verification.... Am i not allowed to do this? blink.gif
Go to the top of the page
 
+Quote Post
OpaQue
post Jun 24 2006, 04:50 AM
Post #3


Administrator
Group Icon

Group: Admin
Posts: 1,459
Joined: 11-June 04
From: Somewhere in Time & Space.
Member No.: 1



Try out the following example.
CODE
<?php
/* recipients */
$to  = "mary@example.com" . ", "; // note the comma
$to .= "kelly@example.com";

/* subject */
$subject = "Birthday Reminders for August";

/* message */
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';

/* To send HTML mail, you can set the Content-type header. */
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "To: Mary <mary@example.com>, Kelly <kelly@example.com>\r\n";
$headers .= "From: Birthday Reminder <birthday@example.com>\r\n";
$headers .= "Cc: birthdayarchive@example.com\r\n";
$headers .= "Bcc: birthdaycheck@example.com\r\n";

/* and now mail it */
mail($to, $subject, $message, $headers);
?>


Secondly, Make sure, your headers are properly sent because you might get banned by other mail companies.

Also, the user who was suspended was sending THOUSANDS of emails were SPAM! We will not suspend anyone without a genuine reason. We have log records and complaints. Refrain from jumping onto any conclusions. :-)
Go to the top of the page
 
+Quote Post
galexcd
post Jun 24 2006, 05:20 PM
Post #4


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********

Group: [HOSTED]
Posts: 1,020
Joined: 25-September 05
From: L.A.
Member No.: 12,251



QUOTE(OpaQue @ Jun 23 2006, 09:50 PM) *

Also, the user who was suspended was sending THOUSANDS of emails were SPAM! We will not suspend anyone without a genuine reason. We have log records and complaints. Refrain from jumping onto any conclusions. :-)

Yeah... thanks, just making sure. rolleyes.gif


QUOTE(OpaQue @ Jun 23 2006, 09:50 PM) *

Try out the following example.
CODE
<?php
/* recipients */
$to  = "mary@example.com" . ", "; // note the comma
$to .= "kelly@example.com";

/* subject */
$subject = "Birthday Reminders for August";

/* message */
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';

/* To send HTML mail, you can set the Content-type header. */
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "To: Mary <mary@example.com>, Kelly <kelly@example.com>\r\n";
$headers .= "From: Birthday Reminder <birthday@example.com>\r\n";
$headers .= "Cc: birthdayarchive@example.com\r\n";
$headers .= "Bcc: birthdaycheck@example.com\r\n";

/* and now mail it */
mail($to, $subject, $message, $headers);
?>


Still wont work, i tried 2 different e-mail adresses. Nothing. My original code worked two days ago, but when i tried it yesterday it didn't work... and i never changed the code. Could the outgoing mail server be broken? I knowticed my mail cliant cant connect to the outgoing mail server for my computing host account.. huh.gif

QUOTE(OpaQue @ Jun 23 2006, 09:50 PM) *

Secondly, Make sure, your headers are properly sent because you might get banned by other mail companies.


Um... what should i set my headers to so i dont get banned from other email companies?
Go to the top of the page
 
+Quote Post
OpaQue
post Jun 29 2006, 02:03 AM
Post #5


Administrator
Group Icon

Group: Admin
Posts: 1,459
Joined: 11-June 04
From: Somewhere in Time & Space.
Member No.: 1



Check now :-)
Go to the top of the page
 
+Quote Post
galexcd
post Jul 1 2006, 01:43 AM
Post #6


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********

Group: [HOSTED]
Posts: 1,020
Joined: 25-September 05
From: L.A.
Member No.: 12,251



QUOTE(OpaQue @ Jun 28 2006, 07:03 PM) *

Check now :-)

Works. Thank you! laugh.gif
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php : Undefined Function Imagecreatefromjpeg() ?!(2)
  2. No Website Configured At This Address(4)
  3. Stability Is Beginning To Become A Severe Issue.(8)
  4. Mail Server Is Down(2)
  5. True Or False Mail From Computinghost ? [resolved](8)


 



- Lo-Fi Version Time is now: 6th September 2008 - 01:25 AM