Jump to content
php.lv forumi

Emailus negrib sūtīt


yeahz

Recommended Posts

Sūtu no localhosta šādu te lietu:

ini_set("SMTP", "smtp.gmail.com");
ini_set("smtp_port", "465");
mail('someone@inbox.lv', 'sveiki', 'aaa ahahahahhahaha', 'From: someone2@gmail.com');

kādēļ negrib strādāt? rezultāts ir tāds, ka vienkārši lapa lādējas mūžīgi un nekas neaizsūtās.

 

EDIT:

pēc laba laika tomēr pārstāja lādēties un izmeta šito

Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in *** on line 43

 

Fatal error: Maximum execution time of 30 seconds exceeded in *** on line 54

Vai tad gmails nepareizi nokonfigurēts?

Edited by yeahz
Link to comment
Share on other sites

Iesaku izmantot phpMailer.

$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp@gmail.com"; // SMTP server
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "mails@gmail.com"; // GMAIL username
$mail->Password = "parole"; // GMAIL password

 

Tik vienkārši redz nav...

Link to comment
Share on other sites

Kemito un Edgar -> āksti :D

kā to username un paroli var norādīt?

 

briedi -> vai tad tiešām ir jāinstalē phpMailer lai aizsūtītu pāris epastus? šis ir īstais? - http://www.askapache.com/php/phpfreaks-eric-rosebrocks-phpmailer-tutorial.html

google izmeta vairākus phpMailerus

 

Jāuzinstalē veseli...divi faili... Jāatzipo, tas ir..

http://phpmailer.worxware.com/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...