Some popular examples for sending emails via PHP.
Example #1 “Small and common” (Just text) ↓
$customer_email = 'customer@example.com'; $email_subject = 'Test e-mail subject'; $email_message = "Hello, Customer\r\nIt's our message information\r\nThanks!"; mail( $customer_email, $email_subject, $email_message);
Example #2 “Simple with headers” (Just text) ↓
$site_email = 'noreply@example.com'; $customer_email = 'nobody@example.com'; $email_subject = 'Test e-mail subject'; $email_message = "Hello, Customer\r\nIt's our message information\r\nThanks!"; $headers = 'From: ' .$site_email. "\r\n" . 'Reply-To:'.$site_email."\r\n"; mail($customer_email, $email_subject, $email_message, $headers);
OR (by only set headers manual) ↓
Continue reading Send e-mail via PHP