Perl send mail
If your program is running on a Linux/Unix system, you can use the sendmail tool in Perl to send mail.
The following is a simple script example for sending mail:
Execute the above program, the output is:
Mail sent successfully
After joining the whitelist, you could procure mail for the most part.
Send HTML designed messages
We can include Content-kind: literary substance/htmln to the header of the message to send a HTML-designed message, as demonstrated inside the accompanying case:
Here we use cpan to install immediately (calls for root privileges), no download:
$ cpan -i MIME ::Lite ... /usr/bin/make install -- OK
After the set up is successful, allow's reveal an instance:
We can upload Content-type: text/htmln to the header of the message to ship an HTML-formatted message, as proven within the following example:
Send a message with an attachment
Send an instance of an electronic mail with an attachment as follows: