Jul 26, 2008

Sending PHP mail with mail() function issue - mail function

Free Web Hosting, No Ads > Xisto Network Sites > ComputingHost Forum > Technical Support

free web hosting

Sending PHP mail with mail() function issue - mail function

galexcd
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!!!!!

Reply

galexcd
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

Reply

OpaQue
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. :-)

 

 

 


Reply

galexcd
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?

Reply

OpaQue
Check now :-)

Reply

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

Check now :-)

Works. Thank you! laugh.gif

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. php mail function unreliable - 57.57 hr back. (1)
Similar Topics

Keywords : sending php mail mail function issue mail function

  1. True Or False Mail From Computinghost ? [resolved] - about billing system (8)
  2. Mail Server Is Down - I cant recive or send mails (2)
    Hi , for 3 day all mail account in my account is not working (sending, Recive) i use webmail system
    , and in 3 day i lost to many important emails i check server status and i see mailscanner = failed
    my domain name is fascript.com , please fix this big problem thanks ...
  3. Stability Is Beginning To Become A Severe Issue. - On Alpha :( (8)
    OK.... I've been with computinghost, for darn near forever. I've recommended, and, still
    do, computinghost to almost everyone I know. Stability used to be so good, but, over the last few
    months, it's beginning to become completely unusable. My sites have been down for more than 30
    mins, almost 55 times this month now. Often, I'll SSH in, to make a small change via MySQL or
    whatnot (which, I ordinarily would have done via phpmyadmin.... /sad.gif"
    style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> ), only to not be able to do
    that EITHE...
  4. No Website Configured At This Address - my domain is having an issue (4)
    I added on the domain indoxylseo.com a few days ago and everything was working fine, but yesterday I
    submitted a support ticket requestion wildcard subdomains and when i checked today, i got the error:
    QUOTE There is no website configured at this address. Please help ASAP, everytime i contact
    live support they tell me to email support and when I do email support, I don't get any
    response! PS. cPanel username: downloa Topic title modified. Please do not make a topic title
    that can be viewed as a fault of ComputingHost. ...
  5. Php : Undefined Function Imagecreatefromjpeg() ?! - (2)
    Hi there, I get this error in my php script : Call to undefined function: imagecreatefromjpeg();
    /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> there is a few time
    this function was enable.... Where is gone the gd library ? Why this usefull library is no more
    enable ? Advice us about this, no way to do a good job whitout this library... Bye....
  6. Php Mail Restrictions And Phpbb - (0)
    Let me start by saying I have several domains hosted by computing host and had some problems with
    their consistency in the beginning. Lately however, they seem to have really turned things around,
    and their uptime has been very good. I appreciate that they were diligent enough to work out their
    problems. Anyway here's my prob: It seems that when using the php mail(), I'm only able to
    send to my hosted domain. I can send to me@myhosteddomain.com and not
    you@yourdomainhostedsomewhereelse.com if you know what I mean. I understand why this is being done
    and I&#...
  7. Can't Send Mail Via Smtp - Help? (9)
    Hi all, I'm setting up my email accounts to use remotely with Outlook and/or Thunderbird. I have
    been able to set up my accounts to pull emails down from the server with both POP3 and IMAP.
    However, I'm not having any luck sending mail. I have tried multiple settings but can't
    figure it out. Outgoing mail server is set to "mail. .com", port 25. I am using the same
    username/password details as for logging in to check mail - that being the email address and
    password that I have set up in cpanel for the particular email address I wanted. I am not using SPA.
    An...



Looking for sending, php, mail, mail, function, issue, mail, function

Searching Video's for sending, php, mail, mail, function, issue, mail, function
advertisement



Sending PHP mail with mail() function issue - mail function



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE