Forums / All Other Contributions/Addons / Email archive search - resend not working

Email archive search - resend not working

Locked

Views: 1,769

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
10 May 2007, 12:13 PM
#1
virtualahmad avatar

virtualahmad

Zen Follower

Join Date:
Jan 2006
Location:
Toronto, Ontario, Canada
Posts:
179
Plugin Contributions:
0

Email archive search - resend not working

I have the email archive search mod installed on a 1.3.7... it works perfectly until i try to resend an email. It gives the following error after i confirm i want to resend the message:

Warning: Invalid argument supplied for foreach() in /home/xxxxxxxx/public_html/includes/functions/functions_email.php on line 373

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/includes/functions/functions_email.php:373) in /home/xxxxxxx/public_html/admin/includes/functions/general.php on line 67

Anyone have any ideas ?

Ahmad Rahman
TRUST IT | web site design and development
mobile: 416.828.0224 | email: [email protected]
www.trustit.ca

For IT solutions how you want IT, when you want IT, TRUST IT.

14 May 2007, 3:04 PM
#2
bouncerfl avatar

bouncerfl

New Zenner

Join Date:
Mar 2007
Location:
sunny Florida, USA
Posts:
80
Plugin Contributions:
0

Re: Email archive search - resend not working

I just got the very same error. eagerly awaiting replies to this thread.

TYIA to all

++++++++++++++++
Subtle as the 'b' in subtle.

25 May 2007, 4:29 PM
#3
bouncerfl avatar

bouncerfl

New Zenner

Join Date:
Mar 2007
Location:
sunny Florida, USA
Posts:
80
Plugin Contributions:
0

Re: Email archive search - resend not working

virtualahmad:

I have the email archive search mod installed on a 1.3.7... it works perfectly until i try to resend an email. It gives the following error after i confirm i want to resend the message:

Warning: Invalid argument supplied for foreach() in /home/xxxxxxxx/public_html/includes/functions/functions_email.php on line 373

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/includes/functions/functions_email.php:373) in /home/xxxxxxx/public_html/admin/includes/functions/general.php on line 67



Please forgive the repost, but I have not been able to determine a fix for the error and was hoping that a repost might gain some attention.

TYIA to all,

~Ray
BouncerFL

++++++++++++++++
Subtle as the 'b' in subtle.

25 May 2007, 5:10 PM
#4
virtualahmad avatar

virtualahmad

Zen Follower

Join Date:
Jan 2006
Location:
Toronto, Ontario, Canada
Posts:
179
Plugin Contributions:
0

Re: Email archive search - resend not working

I welcome the bump for this thread :)

Ahmad Rahman
TRUST IT | web site design and development
mobile: 416.828.0224 | email: [email protected]
www.trustit.ca

For IT solutions how you want IT, when you want IT, TRUST IT.

25 May 2007, 6:45 PM
#5
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Email archive search - resend not working

The problem is this line from your admin/email_history.php file:

zen_mail($email->email_to_name, $email->email_to_address, $email->email_subject, $email->email_text, $email->email_from_name, $email->email_from_address, $email->email_html, 'cc_middle_digs');

Now, on the same file, find:

if ($action == 'resend') {
    // collect the e-mail data
    $email_sql = $db->Execute("select * from " . TABLE_EMAIL_ARCHIVE . " where archive_id = " . $_GET['archive_id']);
    $email = new objectInfo($email_sql->fields);

    // resend the message
    // we use 'cc_middle_digs' as the module because that is not archived (don't want to achive the same message twice)
    zen_mail($email->email_to_name, $email->email_to_address, $email->email_subject, $email->email_text, $email->email_from_name, $email->email_from_address, $email->email_html, 'cc_middle_digs');

    $messageStack->add_session(sprintf(SUCCESS_EMAIL_RESENT, $email->archive_id, $email->email_to_address), 'success');
    zen_redirect(zen_href_link(FILENAME_EMAIL_HISTORY));
  }

replace with:

if ($action == 'resend') {
    // collect the e-mail data
    
    $archive_id = (isset($_GET['archive_id'])) ? zen_db_prepare_input($_GET['archive_id']) : zen_db_prepare_input($_POST['archive_id']);
    
    $email_sql = $db->Execute("select * from " . TABLE_EMAIL_ARCHIVE . " where archive_id = " . (int)$archive_id);
    $email = new objectInfo($email_sql->fields);

    // resend the message
    // we use 'cc_middle_digs' as the module because that is not archived (don't want to achive the same message twice)
    zen_mail($email->email_to_name, $email->email_to_address, $email->email_subject, $email->email_text, $email->email_from_name, $email->email_from_address, $email->email_html, 'cc_middle_digs');

    $messageStack->add_session(sprintf(SUCCESS_EMAIL_RESENT, $email->archive_id, $email->email_to_address), 'success');
    zen_redirect(zen_href_link(FILENAME_EMAIL_HISTORY));
  }

Then, assure that you have your email template file called: email_template_cc_middle_digs.html file under your email folder.

26 Jul 2008, 1:28 AM
#6
cowspot avatar

cowspot

New Zenner

Join Date:
Apr 2008
Posts:
54
Plugin Contributions:
0

Re: Email archive search - resend not working

Has anyone tried this on version 1.3.8a? This is an awesome feature I would love to use.

Cowspot, https://www.cowspotbeads.com
Zen 1.3.8a, InternetSecure Payment Mod, Custom Bundles Mod
SuperTracker Mod, Who Referred You? Mod, Recover Cart Sales