vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Email reminder for inactive users (https://vborg.vbsupport.ru/showthread.php?t=138946)

cubenz 09-03-2007 10:07 PM

Quote:

Originally Posted by djbaxter (Post 1331678)
Nothing wrong with customizing a mod for your own use or even passing along information about how it was done to others.

However, as has been noted, it's not good form to publish the changes as a new add-on, except where attempts to contact the original author have failed for some reason, and that6 doesn't apply in this case.

As a courtesy, I would suggest you also pass the information along to Chris in case it might be helpful to him in developing future versions.

Hear what you say - I'll send to CB as well.

Quentin

cubenz 09-04-2007 08:06 AM

Here's an example of what is happening:

The email is coming out with no 'from', but the real 'from' is showing below the headers
Headers are included in message
HTML tags displayed.

Any clues appreciated!

Quote:

-----Original Message-----
From:
Sent: Tuesday, 4 September 2007 8:33 p.m.
To: <removed for privacy>
Subject: campfire! We miss you!

Content-type: text/html; charset=iso-8859-1

To: campfire <removed>
From: PropertyTalk.com Reminder Service <removed>


<p>Hello, campfire!</p>

<p>We've noticed that you've not been active on PropertyTalk.com for quite
some time now,

and we miss you!</p>

<p>Could we not tempt you back? Here are a few of the things that have been
discussed on the forum recently....</p>

[snip]

Delphiprogrammi 09-05-2007 11:45 AM

hi,

To send that email you must send the content-type header.vBulletins vbmail(); functions uses plaintext by default(/includes/class_mail.php) so something like this

emailreminder.php find

PHP Code:

$message stripslashes($message); 

add below

PHP Code:

$headers NULL;
$headers  'MIME-Version: 1.0' "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' "\r\n";
$headers .= 'Content-Transfer-Encoding: 8bit' "\r\n";
$headers .= 'To: $username <$toemail>' "\r\n";
$headers .= 'From: ' $vbulletin->options['bbtitle'] . ' Reminder Service <' $vbulletin->options['webmasteremail'] . '>' "\r\n";
$headers .= 'Reply-to:Webmaster <' $vbulletin->options['webmasteremail'] . '>' "\r\n";
$headers .='Content-Transfer-Encoding: 8bit' "\r\n";
$headers .='X-Priority: 1' "\r\n"

should do it


if it works feel free to use it if not don't yell at me :D

cubenz 09-05-2007 08:30 PM

Thanks

I'm using 1.0.9, which uses mail directly, not vb_mail.

I'll try the new headers, and see what happens.

Quentin

bryanb 09-06-2007 06:58 PM

I've been using this for a couple of months now, and it's been working great.

One problem - I have had a number of AOL spam complaints due to lazy AOL users who would report these mailings as spam instead of letting me know that they'd like to have their accounts deleted. I real PITA.

Is there any way to deselect AOL email addresses (or any email addresses for that matter) using wild cards? That would be great to add as a modification. In the meantime, I've had to shut this off. :(

Codeman05 09-07-2007 12:52 AM

Quote:

Originally Posted by Greivog (Post 1293568)
Hello

When I install, I get the following when I run the script:

Inactive User Reminder Emails

db)) { exit; } error_reporting(E_ALL & ~E_NOTICE); if($vbulletin->options['reminder_active']){ $now = time(); $datetime = array(); $quantity = $vbulletin->options['quantity']; $datetime[lastpost] = $now - (60 * 60 * 24 * $vbulletin->options['inactivity']); $datetime[lastemail] = $now - (60 * 60 * 24 * $vbulletin->options['frequency']); $usergroups = explode(",",$vbulletin->options['usergroups']); if($vbulletin->options['reminder_posts']){ $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); } else { $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); } print("Found " . mysql_num_rows($result) . " Inactive Users.

"); while($row = $vbulletin->db->fetch_array($result)){ if(is_member_of($row, $usergroups)){ print("Sent To: $row[username]
"); $username = $row[username]; $toemail = $row[email]; $userid = $row[userid]; $bbtitle = $vbulletin->options['bbtitle']; $homeurl = $vbulletin->options['homeurl']; $forumurl = $vbulletin->options['bburl']; $hometitle = $vbulletin->options['hometitle']; eval('$message = "' . addslashes($vbulletin->options['message']) . '";'); $message = stripslashes($message); //$headers = "MIME-Version: 1.0" . "\r\nContent-type: text/html; charset=iso-8859-1" . "\r\n"; $uheaders .= "To: $username <$email>" . "\r\n"; $uheaders .= "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n"; eval('$subject = "' . addslashes($vbulletin->options['subject']) . '";'); $subject = stripslashes($subject); if($vbulletin->options['reminder_emailfooter']){ $message = $message . "Email Reminder System Provided By Mished.co.uk"; } /*if(@mail($email, $subject, $message, $headers)){ print("mailing $email (done)
"); } else { print("mailing $email (failed)
"); }*/ if(is_valid_email($toemail)){ $sentlist .= "$username "; vbmail($toemail, $subject, $message, $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = '', $username = ''); } else { $failedlist .= "$username "; } } } if($sentlist == ""){ log_cron_action("No Emails to send", $nextitem); vbmail($vbulletin->options['webmasteremail'], "Inactive User Reminder Email Report", "This email shows that the product is installed and working as it should be.\n\n\nThere were no inactive users at this time.", $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n", $username = ''); } else { log_cron_action("Emails sent to:$sentlist. We tried to email the following users, but their email address was invalid:$failedlist", $nextitem); vbmail($vbulletin->options['webmasteremail'], "Inactive User Reminder Email Report", "This email shows that the product is installed and working as it should be.\n\n\nEmails sent to:" . $sentlist . ". We tried to email the following users, but their email address was invalid:" . $failedlist . "", $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n", $username = ''); } } else { print("Product is inactive at this time!"); } ?>
Done



The script dosnt sent out any emails if i run it myself or let it run itsself.

Any ideas?


I am having the same error, any thoughts??

Delphiprogrammi 09-07-2007 10:38 AM

phpmailer (http://phpmailer.sourceforge.net) will do just fine to

PHP Code:

require_once(DIR '/includes/class.phpmailer.php');
    
$mail = new PHPMailer();
    
$mail->isSendMail(true);
    
$mail->Priority 1;
    
$mail->isHTML(true);
    
$mail->Encoding "8bit";
    
$mail->CharSet "iso-8859-1";
    
$mail->From "";
    
$mail->FromName "nobody";
    
$mail->AddReplyTo("","webmaster");
    
$mail->AddAddress("$toemail","$username");
    
$mail->Subject "$subject";
    
$mail->Body "$message";
    
$mail->AltBody "";
    
$mail->WordWrap 0;
    if(!
$mail->send());
    {
      echo 
"Mailer Error: " $mail->ErrorInfo;
    } 

will send HTML email easy !

dollster68 09-08-2007 07:03 PM

Thank you, thank you, thank you for this nifty tool. Got it installed with the help of djbaxter (I'm a total novice that needed help with where to upload the .xml file).

Since there are a few versions being run of this mod I would like to suggest a FAQ on the front page. It took a long time to scroll through 50+ pages of this tread only to find that the answer to my question wasn't there. Also, the very first post stated that instructions were included, but I couldn't find any when I downloaded v. 1.09.

bryanb 09-10-2007 08:19 PM

Quote:

Originally Posted by bryanb (Post 1333780)
...Is there any way to deselect AOL email addresses (or any email addresses for that matter) using wild cards? That would be great to add as a modification. In the meantime, I've had to shut this off. :(

Any ideas on how to do this? Thanks in advance!

djbaxter 09-10-2007 09:26 PM

Why did you need to "shut this off" because of AOL? I don't understand the problem. We all know that AOL filters email aggressively but so what?


All times are GMT. The time now is 01:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02325 seconds
  • Memory Usage 1,783KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete