Go Back   Pligg Forum > Pligg Development > Pligg Mods
Reply
 
LinkBack Thread Tools Display Modes
  #101 (permalink)  
Old 12-15-2007, 08:31 AM
VLJ VLJ is offline
Pligg Donor
Pligg Version: beta 9.8.2
Pligg Template: modified yget
 
Join Date: Feb 2007
Posts: 63
Downloads: 16
Uploads: 0
Thanks: 36
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by bbrian017 View Post
I got this to work, thanks everyone
I am curious to know what the problem was... What did the trick?
Reply With Quote
Sponsored Links
  #102 (permalink)  
Old 12-15-2007, 09:04 AM
bbrian017 bbrian017 is offline
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 917
Downloads: 30
Uploads: 0
Thanks: 171
Thanked 17 Times in 17 Posts
Well I'm a noob when it comes to coding and pligg. I mean I can copy paste pretty good but when I have to copy paste and modify I'm in big trouble lol.

When people were signing up they were getting a confirmation e-mail that looked like this in the Body and Title,

Quote:
Welcome to BlogEngagePLIGG_Visual_Name‏
From: admin@blogengage.com PLIGG_PassEmail_From

So I took out this,

Code:
. PLIGG_PassEmail_From . "\r\n"
and

Code:
. PLIGG_Visual_Name
So the register.php looked like this at first,

Code:
echo "Welcome $username<br />";
			echo "Check your e-mail for activating your account.<br />";
			$from = 'From: admin@blogengage.com' . PLIGG_PassEmail_From . "\r\n";
			$subject="Welcome to BlogEngage" . PLIGG_Visual_Name;
			$message = "Hello " . $username . ",\r\n\r\nThanks for registering with us. Please confirm your activation by clicking the following link or by copy, pasting it into your url address field of your browser.\r\n" . my_base_url . my_pligg_base . "/validation.php?code=$encode&uid=$username\r\n\r\nRegards,\r\nAdministrator";
			$to=$email;
			mail($to, $subject, $message, $from);
and now it works perfect like this,

Code:
			echo "Welcome $username<br />";
			echo "Check your e-mail for activating your account.<br />";
			$from = 'From: admin@blogengage.com';
			$subject="Welcome to BlogEngage" ;
			$message = "Hello " . $username . ",\r\n\r\nThanks for registering with us. Please confirm your activation by clicking the following link or by copy, pasting it into your url address field of your browser.\r\n" . my_base_url . my_pligg_base . "/validation.php?code=$encode&uid=$username\r\n\r\nRegards,\r\nAdministrator";
			$to=$email;
			mail($to, $subject, $message, $from);

Last edited by bbrian017 : 12-15-2007 at 09:10 AM.
Reply With Quote
  #103 (permalink)  
Old 12-15-2007, 09:46 AM
TobiParrot's Avatar
TobiParrot TobiParrot is offline
Casual Pligger
Pligg Version: Pligg beta 9.8.2
Pligg Template: Default
 
Join Date: Dec 2007
Location: UK
Posts: 45
Downloads: 1
Uploads: 0
Thanks: 5
Thanked 8 Times in 6 Posts
I think that should be
Code:
$PLIGG_Visual_Name
if you want it to pick up the site name from your prefs.

I haven't used this yet (waiting for PHP 4 version).

Last edited by TobiParrot : 12-15-2007 at 12:18 PM. Reason: Removed trailing dot from code
Reply With Quote
  #104 (permalink)  
Old 12-15-2007, 09:50 AM
bbrian017 bbrian017 is offline
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 917
Downloads: 30
Uploads: 0
Thanks: 171
Thanked 17 Times in 17 Posts
When I add it like that without the ; I get an error

Quote:
Warning: mail(): Bad parameters to mail() function, mail not sent. in /home/content/b/b/r/bbrian017/html/blogengage/register.php on line 173
you need the ;
Reply With Quote
  #105 (permalink)  
Old 12-15-2007, 12:06 PM
TobiParrot's Avatar
TobiParrot TobiParrot is offline
Casual Pligger
Pligg Version: Pligg beta 9.8.2
Pligg Template: Default
 
Join Date: Dec 2007
Location: UK
Posts: 45
Downloads: 1
Uploads: 0
Thanks: 5
Thanked 8 Times in 6 Posts
Quote:
Originally Posted by bbrian017 View Post
When I add it like that without the ; I get an error
you need the ;
Sorry bbrian017. Ignore the trailing dot (my copy-n-paste error). I just meant to highlight that the dollar sign is missing from the variable name. You do still need to close the statement with a semi-colon.

Code:
$subject="Welcome to " . $PLIGG_Visual_Name;
N.b. the space just after the word "to" will separate it from the site name, so it *should* say

Welcome to Blog Engage

If it doesn't work I wouldn't struggle. The way you have done it - by hard-coding the site name into the mail template - is perfectly o.k.

Last edited by TobiParrot : 12-15-2007 at 12:15 PM.
Reply With Quote
  #106 (permalink)  
Old 12-18-2007, 11:48 AM
bbrian017 bbrian017 is offline
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 917
Downloads: 30
Uploads: 0
Thanks: 171
Thanked 17 Times in 17 Posts
Thanks it seems to be working great, minus the waiting time to get the e-mails

I don't see why it's taking so long I run phpbb forums and I get e-mail instantly!
Reply With Quote
  #107 (permalink)  
Old 12-18-2007, 12:06 PM
TobiParrot's Avatar
TobiParrot TobiParrot is offline
Casual Pligger
Pligg Version: Pligg beta 9.8.2
Pligg Template: Default
 
Join Date: Dec 2007
Location: UK
Posts: 45
Downloads: 1
Uploads: 0
Thanks: 5
Thanked 8 Times in 6 Posts
Quote:
Originally Posted by bbrian017 View Post
Thanks it seems to be working great, minus the waiting time to get the e-mails
When the PHP 4 version is released I'll check this, but my guess is there *may* be a problem with how the mail script constructs the email headers. In my experience, if the headers are wrong it can delay email quite badly.
Reply With Quote
  #108 (permalink)  
Old 12-18-2007, 02:20 PM
bbrian017 bbrian017 is offline
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 917
Downloads: 30
Uploads: 0
Thanks: 171
Thanked 17 Times in 17 Posts
Quote:
Originally Posted by TobiParrot View Post
When the PHP 4 version is released I'll check this, but my guess is there *may* be a problem with how the mail script constructs the email headers. In my experience, if the headers are wrong it can delay email quite badly.
You know how I could check this Tobi?
Reply With Quote
  #109 (permalink)  
Old 12-21-2007, 09:19 AM
elderblei elderblei is offline
New Pligger
Pligg Version: 9.8.2
Pligg Template: Slightly modified Mrtechie
 
Join Date: Oct 2007
Posts: 3
Downloads: 10
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Is the PHP4 version ready? It would be the best xmas present I ever had!!!
Reply With Quote
  #110 (permalink)  
Old 12-21-2007, 10:54 AM
TobiParrot's Avatar
TobiParrot TobiParrot is offline
Casual Pligger
Pligg Version: Pligg beta 9.8.2
Pligg Template: Default
 
Join Date: Dec 2007
Location: UK
Posts: 45
Downloads: 1
Uploads: 0
Thanks: 5
Thanked 8 Times in 6 Posts
@bbrian017

If you check the headers of a received email (open the message in Outlook Express, select 'file/properties' then the 'details' tab) there should be a 'return-path' header (not to be confused with 'reply-to'). Some mail transport systems require the return path to match the 'from' header.

Or, it may just be that your ISP subscribes to a Block List service like Spamhaus which can slow things down while mail is checked. If the emails have upset your host's own mail server spam filter, there should be an indication of that in the headers too.

One reason I would like to see the Pligg devs address the root vulnerability of this type of spam attack is that sending (potentially) hundreds of registration emails in one go sounds like a sure fire way to get yourself into trouble with your ISP.
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks Enabled by vBSEO 3.0.0