/    Sign up×
Community /Pin to ProfileBookmark

Why it doesn’t send any e-mail?

[code=php]
/* recipients */
$to = “[email protected]” . “, ” ; // note the comma
$to .= “[email protected]”;

/* subject */
$subject = $Ref;

/* message */
$message = ”
<body>
<html>
<table width=’100%’ border=’1′ cellpadding=’0′ cellspacing=’0′ bordercolor=’#CCCCCC’>
<tr>
<td><table width=’100%’ border=’0′ align=’center’ cellpadding=’0′ cellspacing=’0′ bgcolor=’#FFFFFF’>
<tr>
<td colspan=’2′><div align=’right’><font size=’1′ face=’Verdana, Arial, Helvetica, sans-serif’><strong>N&uacute;mero
de referencia:</strong> “.$codigo.”<img src=’http://www.whatever.com/images/1nada.gif’ width=’10’ height=’9′></font></div></td>
</tr>
</table>
</body>
</html>//The html code I have is longer, but I do not think error comes from there…
“;
}//This bracket is from a bucle I have opened above!
/* To send HTML mail, you can set the Content-type header. */
$headers = “MIME-Version: 1.0rn”;
$headers .= “Content-type: text/html; charset=iso-8859-1rn”;

/* additional headers */
$headers .= “To: Belén <[email protected]>, Ignacio <[email protected]>rn”;
$headers .= “From: Customer <$email>rn”;

/* and now mail it */
mail($to, $subject, $message, $headers);[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@Aronya1Dec 15.2003 — I don't know if this has anything to do with the problem, but you opened your <body> tag before your <html> tag. Also, you have 2 tables opened, but close only one.

What's the error you mention?


<body>

<html>

<table width='100%' border='1' cellpadding='0' cellspacing='0' bordercolor='#CCCCCC'>

<tr>

<td><table width='100%' border='0' align='center' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>

<tr>

<td colspan='2'><div align='right'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'><strong>N&uacute;mero

de referencia:</strong> ".$codigo."<img src='http://www.whatever.com/images/1nada.gif' width='10' height='9'></font></div></td>

</tr>

</table>

</body>

</html>[/QUOTE]
×

Success!

Help @Perfidus spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...