If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Email new message not working?  XML
Forum Index » Advanced Guestbook Forum
Author Message
MikeWest
Beginner

Joined: 04/08/2009 21:03:55
Messages: 8
Location: USA
Offline

I am not getting emails for new guestbook posts. I have set the email address in general settings and checked the "send e-mail to webmaster" option. I also tried editing the config.inc.php field $TEC_MAIL.

I've tried the email address on the same domain as agb and also my hotmail address.

I notice in general settings it says an email process must be properly configured. How do I check this?

Thanks, Mike.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Have you tried making an entry and seeing if it sends you a thank you email?

That is a feature of AG if memory serves.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
MikeWest
Beginner

Joined: 04/08/2009 21:03:55
Messages: 8
Location: USA
Offline

Yes I tried making a post after checking the general option to send a thank you email to guest. I see in the general options it mentions sendmail. I'm using a shared windows host on godaddy.com. Will that have sendmail, or is sendmail only linux? Thanks, Mike.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Possibly they do not allow scripts to send emails. GoDaddy are slightly crap to be honest.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
MikeWest
Beginner

Joined: 04/08/2009 21:03:55
Messages: 8
Location: USA
Offline

I spoke too soon. I am now getting a thank you email to the guest, but still not to the webmaster. Any ideas?

Also the subject on the email to the guest still says "Thank you for signing the guestbook" even though I changed the general setting and got the change in the message body!
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Message subject and body are hard coded in to files.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
MikeWest
Beginner

Joined: 04/08/2009 21:03:55
Messages: 8
Location: USA
Offline

Do you know which file? Body came through as expected, only subject needs change.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Subject is in the language file so I'm guessing for you lang/english.php

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
MikeWest
Beginner

Joined: 04/08/2009 21:03:55
Messages: 8
Location: USA
Offline

Thanks, that was the answer. Now if I could only get the webmaster email working as well, any ideas?
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

The address you have supplied is correct yes? And you have checked spam folders?

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
MikeWest
Beginner

Joined: 04/08/2009 21:03:55
Messages: 8
Location: USA
Offline

There is only one email address in general settings which is correct. I assume this is the one being used? I also put the same email address in config.inc.php for field $TEC_MAIL just in case. I also checked spam folders, nothing there.

I see in add.class.php at line 330 the @mail() method is called to send admin an email. The last parameter reads "From: $from_email\nX-Mailer: Advanced Guestbook 2". This differs from line 333, where the guest email is sent, which reads "From: ".$this->db->VARS['admin_mail']."\nX-Mailer: Advanced Guestbook 2", ie $from_email in the former is inside quotes - is this correct? I don't know PHP, but it looks wrong.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

You can remove the @ from @mail to make it show any errors.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
MikeWest
Beginner

Joined: 04/08/2009 21:03:55
Messages: 8
Location: USA
Offline

After removing @ before mail on line 330, I got this error:-

Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\2704005\html\comments\lib\add.class.php on line 330
Guestbook

I checked the web page, it talks about bare LFs, ie line feed characters with no preceeding CR carriage return character.

So I changed line 330 from:-

@mail($this->db->VARS["admin_mail"],$this->db->LANG["EmailAdminSubject"],"$this->name\n$this->host\n\n$this->comment", "From: $from_email\nX-Mailer: Advanced Guestbook 2");

to:-

@mail($this->db->VARS["admin_mail"],$this->db->LANG["EmailAdminSubject"],"$this->name\r\n$this->host\r\n\r\n$this->comment", "From: $from_email\nX-Mailer: Advanced Guestbook 2");

Note the added \r. Line 327 needs amending likewise for private messages. Thanks for your help Carbonize. Mike.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

That is the first time I have ever come across that issue. Easy enough to code a check for but very bizarre.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Advanced Guestbook Forum
Go to:   
Based on the open source JForum