/    Sign up×
Community /Pin to ProfileBookmark

Sending Emails With PHP?

I’m using this peice of code to seen emails to people who visit my website:

$first_name = stripslashes($row[‘first_name’]);
$email_address = stripslashes($row[’email_address’]);
$subject = “”;
$body = “$content”;
$headers = “From:[email protected]
“X-Mailer: php”;

if (mail($email_address, $subject,$html_body, $headers))
{
echo “Message sent!”;
}

I have 2 questions
1)Can anyone explain to me what the $headers variable is for? Example:What is X-Mailer: php

2) I would like to make the font in the emails I send Bigger. The only way I can think of doing this is using html. But, when I embed html into my $body variable (example: $body=”<html><body><fontsize=”4″>$content</font></body></html>”?
the email says exactly whats in body, so the html is not rendered just spits out the tags and what’s in $content. Can someon explain how I might go about doing this?

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @kjgreen 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 5.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...