W
W
wolfak2015-03-18 11:08:53
PHP
wolfak, 2015-03-18 11:08:53

How to send an email to Gmail in PHP?

Hello. Tell me how to send an email to Gmail using the mail () function in PHP. Part of the markup is not treated as HTML and is displayed simply as text.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
KorsaR-ZN, 2015-03-18
@wolfak

Are you sending the Content-type header via the appropriate parameter to the mail function ?
Also, the value of the meta tag (Content-type) in the body of the letter must match the value from the sent header.
And also the letter must fully comply with - RFC 2822

L
Leonid Sysoletin, 2015-03-18
@sysoletin

HTML in emails is a big, interesting, and confusing topic.
I suggest using something like phpMailer which knows how to do this and more, like file attachments.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question