A
A
Alexander Pankov2015-02-01 15:11:42
PHP
Alexander Pankov, 2015-02-01 15:11:42

How to send an HTML email to a non-programmer?

Hello.
tell me, maybe there is some software to send html letters to a simple user, not a programmer?
There is a task to send beautiful email letters to certain addresses.
How to make them up, I roughly understand (table, inline-css), but how to send it?
Through php on some feedback form, I do this, I just store the template in php, substitute the data and send it with the mail () function.
But how to do it for a non-programmer, who, for example, has only an html file of a letter and does not have a send address, so that he can select an html file and click send and that's it ...
Thank you in advance for your help!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Viktor Vsk, 2015-02-01
@viktorvsk

MailChimp and analogues. Actually, search for "Service for sending email"

P
Puma Thailand, 2015-02-01
@opium

any mailing service
the same unisender

S
Stac, 2015-04-01
@Stac

The mail() function in PHP sends HTML emails just fine*.
You just need to add a header ("content-type: text/html; charset=UTF-8").
Here is an example call: $res = @mail($email, $subject, $message, "FROM:" . $from_email . "\nREPLY-TO:" . $reply_to_email . "\ncontent-type: text/html; charset= UTF-8");
In $message you will have the HTML code of the email. This is a poor man's option - your script will require minimal changes.
But the "big guys" do things differently. They send i.e. multipart letter, where there is both a text and an HTML version. The code for sending it is a little more difficult to write (I have almost 20 lines).
But the already written classes will help here, monstrous in size and inconvenience (compared to a simple call to mail (),
* - there may be problems with encodings (including subject encoding, because there is a separate encoding algorithm for this) in certain mail clients, such as Lotus Notes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question