I didn’t write html-e-mail before, I just installed php email using http://www.postmarkapp.com
I was wondering how am I going to send php mail as html?
Does anyone have any previews of a php page sending an html email address that I can look at to understand how this works?
Currently, I just put the text in a variable and send it as a message, how is this done for html?
Hi
Do you still want to use Postmark to send emails?
Postmark TextBody HtmlBody html-. . , HTML , . .
TextBody
HtmlBody
: . , , HTML . , , .
$htmlBody = " <html> <body> Thank you for using our app!<br /> - Super Awesome App Team </body> </html> ";
html , , , - text/html.
$headers.= 'MIME-Version: 1.0' . "\r\n"; $headers.= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers.= "From: eaxfd@gmail.com \r\n"; $headers.= "Reply-To: eaxfd@gmail.com \r\n"; mail($to,$subject,$message,$headers);
http://phpmailer.worxware.com/
This is the best class I have found for sending mail with PHP. It allows you to format HTML with an alternative part of plain text, as well as attachments. It also seems to filter out spam well enough when it is used for online forms.
You just need to include the html headers in your function call mail():
mail()
$headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1'; mail($to, $subject, $message, $headers);
Source: https://habr.com/ru/post/1778122/More articles:This host is not known, ClientDependency - c #How to declare a universal function that returns a type that satisfies several restrictions in F #? - genericsin c #. What does the @ symbol do? - c #How can I manage the source code without version control tools? - version-controlSilverlight RIA Services DomainDataSource, the relationship between AutoLoad and RefreshInterval - silverlightEntity Platform Performance Problem - .netAndroid emulator sometimes does not connect to the Internet - androidImage display according to the phase of the moon - phpПанорамирование и масштабирование большого изображения, как в Bing Map control - windows-phone-7Ubuntu: C ++ :: Boost Library Update - c ++All Articles