Difference between revisions of "Send email with PHP"

From Altervista Wiki
Jump to: navigation, search
(Created page with "Altervista allows eMail sending from web sites using the common [http://php.net/manual/en/function.mail.php PHP mail() function]. This way it is possible to send useful inform...")
(No difference)

Revision as of 18:27, 12 February 2016

Altervista allows eMail sending from web sites using the common PHP mail() function. This way it is possible to send useful information to registered users or to set up a contact form for visitors.

Limitations

To prevent users to abuse the service with negative consequences for the whole community the Altervista systems sets a limit of 3 eMails sent every 2 seconds.

Because of this limitation we don't suggest to use this system to send eMail to a lot of receivers because most of them would be blocked. If you need to send many messages please use the Newsletter tool from the Altervista control panel.

Another solution is to use an external tool as SendGrid.

Spam reporting link

Every message sent through your Altervista website includes a spam reporting link at the end of the message to allow receivers to report as spam that message. It is not possibile to remove this part of the message.

Set sender name and address

Setting only the required fields for the mail() will result with a mail apparently send by "Apache". You can easily customize the sender with a simple additional header:

mail(
  'receiver@example.com',
  'Message subject',
  'Message content text',
  'From: "Name Surname" <name.surname@example.com>'
);