Jump to content

mail() + HTML


grilldor

Recommended Posts

Im trying to send a mail with HTML script in it.. Im having a problem with sending URL adresses :

[code]<?php
$to  = '[email protected]';
$subject = 'Registration';
$message = '
<b>Thank you for registering to Cruxx Online!</b> You are one step away from creating your account !</b><br />
The remaining step is to validate that this email exists and that it is tied to an account name.<br /><br />
Please copy the following validationID into the form located at : <a href="http://crux.projetlogik.com">http://crux.projetlogik.com
</a><br />
VALIDATION ID : G2J4J6KL2K44<br /><br />
Thank you ! See you soon in the galaxy!
';


$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-Type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Cruxx Online <[email protected]>' . "\r\n";

mail($to, $subject, $message, $headers);
?> [/code]

email will not send when the // are added to : http://crux.projetlogik.com... whats up?
Link to comment
https://forums.phpfreaks.com/topic/26944-mail-html/
Share on other sites

[code]
$headers  = 'MIME-Version: 1.0\r\n';
$headers .= 'Content-Type: text/html; charset=iso-8859-1\r\n'.'Content-Transfer-Encoding: base64\r\n\r\n';
$headers .= 'From: Cruxx Online <[email protected]>\r\n';
[/code]

I replaced the double slashes with single, deleted the double slashes, and added some new line.

Just replace your script with this script and it should work fine.
Link to comment
https://forums.phpfreaks.com/topic/26944-mail-html/#findComment-123633
Share on other sites

oh and the base64 encoding sends weird emails : N§“*.~Šëz¬µêâž h»±ÄéåŠw˜¢æ«z‰Þ²×©k²~º&r·š¶)àÊ‹«iÇ(º{S…êÞ™¨§Šx,µêb²Ú/jXj×­…«m†+™¨¥{¬¶Æ§vØZ¶+b²Øžvڝ§¢é흩ž>Wš±ç(§+ayú%–Œ"ž Ú–'Z¶*' 8§¶‹ayú+šZjםjØm¶Ÿÿr»±¦º#zÙh‚)¢e@,€ÀLƒ ?Õ÷œož{Î7ëuï¾·ßÞßy­›iå@0M·Û}wÛ]õÙ¦“…©äÊ‹’y쨺Ê(ž)í…蕬r
Link to comment
https://forums.phpfreaks.com/topic/26944-mail-html/#findComment-123807
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.