mail()-don't work (intermediate)

Status
Not open for further replies.

heinzketchup

New Member
Messages
25
Reaction score
0
Points
0
sorry to be such a nagger...
After i finally became an upgrade after 4 days of waiting... (thanks again to "christopher"->senior account manager!)
uploads work fine now but the mailing function still doesn't...

i use this script i posted by myself and used quite often:
http://forums.x10hosting.com/tutorials/75495-utf-8-encoded-php-mail-subject-umlauts-problem.html

i get until this part where the mail should be sent:
mail($MailTo, $subject, $msg, $headers);

if i write: "test" instead of $headers it works fine!!!

i checked everything with var_dump and everything should work!

thats the header:
$headers = "From: $from";
$headers .= "\r\n"; //(This is to write paragraphs windows conform...)
$headers .= "Content-type: text/plain";
$headers .= "\r\n\r\n";

PLEASE HELP...
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
I verified mail is working on your server, are you still having issues?
 

heinzketchup

New Member
Messages
25
Reaction score
0
Points
0
hi corey...
well i got this little script working... i didn't really changed anything but it suddenly worked.
the problem is, i need the script i posted here: http://forums.x10hosting.com/programming-help/76395-php-mail-func-encoding-problem.html#post428040

because if the receiver can't access it as html, it is automatically shown as text!
it worked before, i didn't change anything, but then i suddenly had to upgrade to intermediate and afterwards it worked nomore...
Edit:
just found out that the problem is this line:
[FONT=&quot]$headers .= "Content-Type: multipart/mixed; $eol boundary=\"".$bndp."\"".$eol.$eol;[/FONT]:dunno:
 
Last edited:

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
If you just want it to send HTML e-mails you can change this:
PHP:
$headers .= "Content-type: text/plain";
to:
PHP:
$headers .= "Content-type: text/html";
 

heinzketchup

New Member
Messages
25
Reaction score
0
Points
0
well...
i want to send html mails, but some mailing services like inode.at block the html content automatically and this script does the following in this case: it automatically strips the tags and transforms the <br/>s into \n

thats why there are text/html and text/plain in the code...
Edit:
ok, i finally made it!
don't exactly know what the problem was, but these are my changes:

this:
$headers .= "Content-Type: multipart/mixed; $eol boundary=\"".$bndp."\"".$eol.$eol;

changed to:
$headers .= "Content-Type: multipart/mixed; boundary=\"$bndp\"";

yeah, thats it...?
its really odd, it worked with other method before but!
Who cares... now it works!

THANKS FOR ALL YOUR HELP!

i close now
 
Last edited:
Status
Not open for further replies.
Top