0

I try to send an email with my adress mail from PHP, but the mail was not delivered. This is the log :

Mar 15 23:11:30 vps-**** sendmail[5519]: v2FMBUKG005519: Authentication-Warning: vps-21663.fhnet.fr: www-data set sender to mywebsite@site.com using -f

Mar 15 23:11:30 vps-**** sendmail[5519]: v2FMBUKG005519: from=mywebsite@site.com, size=633, class=0, nrcpts=1, msgid=<58c9bc127f710@site.com>, relay=www-data@localhost

Mar 15 23:11:30 vps-**** sm-mta[5520]: v2FMBU6A005520: from=<mywebsite@site.com>, size=830, class=0, nrcpts=1, msgid=<58c9bc127f710@site.com>, proto=ESMTP, daemon=MTA-v4, relay=vps-****.****.fr [127.0.0.1]

Mar 15 23:11:30 vps-**** sendmail[5519]: v2FMBUKG005519: to=myemail@outlook.com, ctladdr=mywebsite@site.com (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30633, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (v2FMBU6A005520 Message accepted for delivery)

I'm novice and i have several question about the mail. I have an adress mail : no-reply@site.com.

Which server smtp i need to use?

Where we configure the mail who want to use, the password, the port...?

Because I have all configure in PHP, but I need to modify my conf php, or the conf of sendmail?

Thanks you for your help !

Daphyduck
  • 127
  • 1
  • 10
  • It said it was accepted for delivery, which means it probably got caught by a spam filter on the other side. – aynber Mar 16 '17 at 12:27

1 Answers1

0

PHP has a class for email, you can do this...

     // in the controller
 `$para = $usuario; 
  $asunto = "Asunto";
  $mensaje_correo = "<html lang='es'><head><title>Title</title></head>      <body>Contenido<br><a href=''> Activar </a></body></html>";                        
// to send a email with html mail, the header content-type most fixed
 $cabeceras = "MIME-Version: 1.0"."\r\n";
 $cabeceras .= 'Content-type: text/html;charset=iso-8859-1'."\r\n";
// aditional headers
 $cabeceras .= 'From: LACETEL <correo.domain.com>'."\r\n";
 //then I send email
 // the config file 
 $config['protocol'] = 'smtp'; 
 $config['mailpath'] = '/usr/sbin/sendmail';
 $config['charset'] = 'iso-8859-1';
 $config['mailtype'] = 'html';
 $config['wordwrap'] = FALSE;
 $config['protocol'] = 'smtp';
 $config['smtp_host'] = 'your host name';
 $config['smtp_port'] = your port number;
 $config['smtp_user'] = 'your mail';
 $config['smtp_pass'] = 'yor password mail';
` 

I hope it is can usefull for you

Mary
  • 197
  • 1
  • 15