28, May 2012

Register.php not sending email - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Register.php not sending email
« previous next »
Pages: [1] Print

Author Topic: Register.php not sending email  (Read 3860 times)
Kill the googlebot
*
Posts: 6
44 credits
Members referred : 0


« on: Mar 12, 2007, 10:25:07 am »

I am trying to test the access_user Register.php class but can not get the user to register


I fill in all fields but get the error Sorry, an error occurred please try it again.
which looking through the code appears to be an error due to the email not being able to be sent.

I am hosing the site on a Diskstation DS106.
I can not see ho the email is to be sent as there is no where specifying the SMPT or POP3 addresses.

Tim Norton
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Mar 12, 2007, 11:48:03 am »

Hello Tim,

do you tried to send a mail with the mail() function without using the class?

Kill the googlebot
*
Posts: 6
44 credits
Members referred : 0


« Reply #2 on: Mar 12, 2007, 12:19:48 pm »

Hello Tim,

do you tried to send a mail with the mail() function without using the class?

I just tried this with no luck. Am id missing something
<?php
include($_SERVER['DOCUMENT_ROOT']."/classes/access_user/access_user_class.php");

$test_page_protect = new Access_user;
$test_page_protect->send_mail('tnorton@adam.com.au')


?>
Kill the googlebot
*
Posts: 6
44 credits
Members referred : 0


« Reply #3 on: Mar 12, 2007, 12:23:02 pm »

Whats throwing me here is there is no settings for the POP3 or SMTP servers so what is sending  the email?

   function send_mail($mail_address, $num = 29) {
      $header = "From: \"".$this->webmaster_name."\" <".$this->webmaster_mail.">\r\n";
      $header .= "MIME-Version: 1.0\r\n";
      $header .= "Mailer: Olaf's mail script version 1.11\r\n";
      $header .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n";
      $header .= "Content-Transfer-Encoding: 7bit\r\n";
      if (!$this->auto_activation) {
         $subject = "New user request...";
         $body = "New user registration on ".date("Y-m-d").":\r\n\r\nClick here to enter the admin page:\r\n\r\n"."http://".$_SERVER['HTTP_HOST'].$this->admin_page."?login_id=".$this->id;
      } else {
         $subject = $this->messages(28);
         $body = $this->messages($num);
      }
      if (mail($mail_address, $subject, $body, $header)) {
         return true;
      } else {
         return false;
      }
   }
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Mar 12, 2007, 12:49:52 pm »

try this first:

mail('caffinated@example.com', 'My Subject', $message);

more infois  here: http://php.net/manual/en/function.mail.php

Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Mar 12, 2007, 12:51:05 pm »

Quote
Whats throwing me here is there is no settings for the POP3 or SMTP servers so what is sending  the email?

this script is not a desctop mail client, the mail is send bt PHP and doesn't need extra configurartion

Kill the googlebot
*
Posts: 6
44 credits
Members referred : 0


« Reply #6 on: Apr 09, 2007, 02:02:16 pm »

After much stuffing around, I realized that the problem was my ISP was rejecting the email SMTP request due to an unknown IP address as a suspect spammer - Returned Error 550
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6209
Tags : email register Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Register.php not sending email
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 06:50:58 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.