Skip to content

Instantly share code, notes, and snippets.

@baobao
Created July 14, 2013 12:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save baobao/5994190 to your computer and use it in GitHub Desktop.
phpでメール送信
<?php
mb_language("Japanese");
mb_internal_encoding("UTF-8");
$mail_to = 'sample@gmail.com';
$subject = 'test';
$mail_text = 'テストメール';
$reply_to = 'From: no-reply@hoge.com';
$result = mb_send_mail($mail_to, $subject, $mail_text, $reply_to);
if ($result) {
echo 'success';
}
else {
echo 'fail';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment