vikidigi posted on 2009-01-09 21:29:32 #
plz help
i get the meaasge[13] at the line 322 in the access_users_class.php
when i submit on register page i get message
"Sorry, an error occurred please try it again."
my setting in db_config.php are
// change these settings to use phpmailer in place of the PHP mail() function
define("USE_PHP_MAILER", true); // true = use phpmailer
define("PHP_MAILER_SMTP", false); // true send by SMTP, false = sendmail
// if you enable these features you need to install the phpmailer class!
if (USE_PHP_MAILER) include_once($_SERVER['DOCUMENT_ROOT']."/classes/PHPMailer/class.phpmailer.php");
if (PHP_MAILER_SMTP) {
define("SMTP_SERVER", "ssl://smtp.gmail.com:465");
define("SMTP_LOGIN", "vikidigi@gmail.com");
define("SMTP_PASSWD", "password");
}
plz help soon
thanx
The most popular forum posts:
Comments / discussions
Olaf posted on 2009-01-09 21:30:53 #
do you uploaded these file(s)?
vikidigi posted on 2009-01-09 23:58:50 #
vikidigi posted on 2009-01-10 00:01:47 #
yes i have
classes\PHPMailer
its the phpMailer_v2.3.zip
i have done this
Olaf posted on 2009-01-10 07:24:24 #
are you able to send regular mail with:
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail('caffinated@example.com', 'My Subject', $message);
?>
and don't post multiple times the same question!
vikidigi posted on 2009-01-10 19:47:17 #
sir i user PHPMailer because the other way shows me errorr when i use thst mail method
Warning: mail() [function.mail]: SMTP server response: 450 smtpout01.dca.untd.com Authentication required in C:\xampp\htdocs\simpleMail.php on line 16
Mail NOT Sent
vikidigi posted on 2009-01-10 19:54:23 #
i get this message because of the send_mail function
"Sorry, an error occurred please try it again."
sorry message number was 14 not 13
$msg[14] = "Sorry, an error occurred please try it again.";
if ($this->send_mail($this->user_email, 29, 28)) {
$this->the_msg = $this->messages(13);
} else {
mysql_query(sprintf("DELETE FROM %s WHERE id = %d", $this->table_name, $this->id));
$this->the_msg = $this->messages(14);
function is .............
function send_mail($mail_address, $msg = 29, $subj = 28, $send_admin = false) {
$subject = $this->messages($subj);
$body = $this->messages($msg);
if (USE_PHP_MAILER) {
$mail = new PHPMailer();
if (PHP_MAILER_SMTP) {
$mail->IsSMTP();
$mail->Host = SMTP_SERVER;
$mail->SMTPAuth = true;
$mail->Username = SMTP_LOGIN;
$mail->Password = SMTP_PASSWD;
} else {
$mail->IsSendmail();
}
$mail->From = $this->webmaster_mail;
$mail->FromName = $this->webmaster_name;
$mail->AddAddress($mail_address);
if ($send_admin) $mail->AddBCC(ADMIN_MAIL);
$mail->Subject = $subject;
$mail->Body = $body;
if($mail->Send()) {
return true;
} else {
return false;
}
} else {
$header = "From: \"".$this->webmaster_name."\" <".$this->webmaster_mail.">\n";
if ($send_admin) $header .= "Bcc: ".ADMIN_MAIL."\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
$header .= "Content-Transfer-Encoding: 7bit\n";
if (mail($mail_address, $subject, $body, $header)) {
return true;
} else {
return false;
}
}
}
Olaf posted on 2009-01-10 20:51:02 #
Then you need to send the mail with smtp, but forget it using gmail for this... you need another smtp provider.
sometimes it's easier to pay a few $ for a small (but real) hosting account...
vikidigi posted on 2009-01-10 23:01:52 #
i have checked the PHPmailer with a simple test page and it sends the mail but the same code setting does not wotk in your code
any suggestion
Olaf posted on 2009-01-11 07:30:45 #
okay
what is your setting here?
define("PHP_MAILER_SMTP", false); // true send by SMTP, false = sendmail