Mail Function

Posted: December 16, 2014 in Functions

The mail() function allows you to send eamils dire…

The mail() functions are part of the core. There i…

Syntax : mail(to,subject,message,headers,parameters)

Note:
  • when you want to use mail() function, you have to check the runtime configuaration of the mail in the “php.ini” file.
  • SMTP should be default as “localhost“.
    smtp_port should be “25“.
    sendmail_from should be NULL.
    sendmail_path should be NULL.
Parameters :
  • to * : It specifies the Receiver/Receivers of the email.
  • subject * : specifies the Subject of the email.
  • message * : specifies the Message to be sent. Each line should be separated with LF(\n). Lines should not exceed 70 characters.
  • headers : specifies the additional headers like From, Cc and Bcc the additional headers should be separated with a CRLF(\r\n).
  • parameters : specifies an additional parameter to the sendmail program.

mail

Leave a comment