4

its my controller

    $to = "goeboekimutcs@gmail.com";
    $subject = "Goeboek I-Mut";
    $content = "<html><body><p>Test Content</p></body></html>";
    $headers = "From: goeboekimutcs@gmail.com";
    mail($to, $subject, $content, $headers);

it's my php.ini

; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
sendmail_path = "\"D:\Programs\xampp\sendmail\sendmail.exe\" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\Programs\xampp\mailoutput folder
; sendmail_path="D:\Programs\xampp\mailtodisk\mailtodisk.exe"

it's my sendmain.ini

smtp_server=smtp.gmail.com

; smtp port (normally 25)

smtp_port=587
auth_username= goeboekimutcs@gmail.com
auth_password= **

i open my controller at my browser, after loading, i refresh my gmail but no email come.. sometimes it send but often not send. what happen?

yudijohn
  • 1,248
  • 3
  • 19
  • 43

1 Answers1

1

It is better to use some third party library for sending emails like PHPMailer which saves you a lot of headaches. All you need to do is set some initial configurations.

You can get the latest update here and also the usage:

PHPMailer Github link

Abhinav
  • 8,028
  • 12
  • 48
  • 89