Last active
June 9, 2021 13:26
-
-
Save Serabass/3a6813ac06bd4d8621118b662a3063fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://habr.com/ru/post/26518/ | |
$from = "[email protected]"; | |
ini_set("sendmail_from", $from); | |
ini_set("SMTP", "myserver"); | |
ini_set("smtp_port", 25); | |
$to = "[email protected]"; | |
$subject = "Email Subject"; | |
$message = "Dear " . "name" . ",<br>"; | |
$message .= "We welcome you to be part of family<br><br>"; | |
$message .= "Regards,<br>"; | |
// Always set content-type when sending HTML email | |
$headers = "MIME-Version: 1.0" . "\r\n"; | |
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; | |
// More headers | |
$headers .= "From: <" . $from . ">" . "\r\n"; | |
$headers .= "Cc: [email protected]" . "\r\n"; | |
mail($to, $subject, $message, $headers); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment