Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unsubscribe Link does not include domain


Guest

Recommended Posts

Just got done installing the Newsletter Unsubscribe v2.2 contribution, and all seems to be working except that the unsubscribe link is not formed correctly in the e-mail. It is not including the site domain, for example a test message source code looks like this:

 

To unsubscribe from this newsletter, just click on the following link:<br><a href="/catalog/[email protected]">/catalog/[email protected]</a>

 

so the link just shows up like:

 

/catalog/[email protected]

 

I checked the admin/includes/modules/newsletters/newsletter.php file, and have the following code installed per the install instructions:

 

// Begin Unsubscribe hack
$mimemessage = new email(array('X-Mailer: osCommerce bulk mailer'));        while ($mail = tep_db_fetch_array($mail_query)) {
          $mimemessage->add_html($this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>');
 $mimemessage->build_message();
$mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
       }
     // End Unsubscribe hack

 

It appears that the .HTTP_CATALOG_SERVER part is not being added.

 

Can anyone suggest a possible solution? Did I miss something during the install (I went back and double-checked, it all appears to be there). Any help would be greatly appreciated.

 

John

Link to comment
Share on other sites

Yeah, that was written on a really old version of osC. Try changin HTTP_CATALOG_SERVER to HTTP_SERVER

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

My pleasure. I'm glad someone found one of my contributions to be useful.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...