我在这里有一些代码,我试图用 css 为 $first 的 PHP 变量设置样式,但显然有些不对,因此我在这里的原因。
我最终想为整条消息设置样式并包含徽标和/或背景颜色,以便发送此电子邮件时是“html电子邮件”,但我对PHP一无所知,我想我正在一点一点地学习.
这是我的代码:-------->
$user = "$email";
$usersubject = "Thank you for subscribing";
$userheaders = "From: subscriptions@3elementsreview.com\n";
$userheaders .= "Content-type: text/html\r\n";
$usermessage = "Welcome <span style='color:#ff6000; font-size:1.25em; font- weight:bold;>$first</span>,
We're glad you've decided to subscribe to our email list!
There's a lot of great things happening at 3Elements that we can't wait to show you.
So stay tuned for notifications about submission periods, issue release dates, contests, and other news. Also, be sure to like us on Facebook and follow us on Twitter!
Sincerely,
The 3Elements Team
www.3ElementsReview.com
Facebook.com/3elementsreview
@3ElementsReview";
mail($user,$usersubject,$usermessage,$userheaders);