CMS MADE SIMPLE FORGE

Guestbook

 

[#7435] Incorrent mail notification delivery

avatar
Created By: zyta2002 (zyta2002)
Date Submitted: Mon Jan 09 02:50:48 -0500 2012

Assigned To: Krisztian Kishazi (kishman155)
Version: 1.4_RC2
CMSMS Version: 1.10.2
Severity: Minor
Resolution: Accepted
State: Closed
Summary:
Incorrent mail notification delivery
Detailed Description:
I've installed CMSMailer 2.0.2, and I'm able to send testmails from CMSMailer
(TestForm) to the mailaddress i specified in guestbook (mailnoti).

This means: cmsmailer works, and the recipient is accepting my mail. (Tested out
of CMSMailer).

But, when Guestbook tries to send a mailnotification, it either chooses the
wrong type (PHP), or it calls CMSMailer the wrong way.

What i see is the following:
Guestbook sends using the wrong sender mailaddress. It chooses the default one
(httpuser@domain), instead of the address i specified inside cmsmailer (from
address).

Cause i dont have an httpuser@domain address, and the recipient is doing a
sender-address verification, I'm not able to send mail-notifications.

NOQUEUE: reject: RCPT from mx********: 550 5.1.1 <******@***********.**>:
Recipient address rejected: User unknown in local recipient table; from=<>
to=<*******@********.**> proto=SMTP helo=<********.****.****.**>

Yes, i could just create an httpd-user@domain mail on my server as a workaround,
but i'd prefer the correct working guestbook+cmsmailer solution :)


History

Comments
avatar
Date: 2012-01-14 16:40
Posted By: Vadim (vruzh)

I confirm this bug. Mail notification is not working correctly at all.
      
avatar
Date: 2012-01-25 20:08
Posted By: Nico (shiftdel)

Hi, i found the solution.

Edit file "class.GuestbookFrontend.php"

where: // send the mail change all for:


		// send the mail
		# see if the CMSMailer module is installed
		if ($this->cms->GetModuleInstance('CMSMailer'))
		{
            foreach($e_mailnoti_to as $one_email){
                if($one_email != ''){
					$cmsmailer = $this->cms->GetModuleInstance('CMSMailer');
					$cmsmailer->AddAddress($one_email);
					$cmsmailer->SetBody($msg);
					$cmsmailer->IsHTML(true);
					$cmsmailer->SetSubject($e_mailnoti_subj);
					$cmsmailer->Send();
					$cmsmailer->reset();
                }
            }
		} else {
$headers = "MIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nContent-Type:
text/plain; charset=\"UTF-8\"";
			$encoded_subject = "=?UTF-8?B?".base64_encode($e_mailnoti_subj)."?=\n";
			mail(
str_replace("\n", ',', $params['mailnoti']), 	// address to send the mail to
				$encoded_subject, 	// E-mail subject
				$msg,			// The E-mail message
				$headers		// Additional mail headers
			);
		}
		
	}



Works fine for me.
      
avatar
Date: 2012-03-07 13:39
Posted By: Vadim (vruzh)

Please give example. I does not work. Which parametr did you change? 
      
avatar
Date: 2012-08-25 14:47
Posted By: Krisztian Kishazi (kishman155)

i will need to test this , i have no knowledge now how cmsmailer work but  i
could not garanty if i will use the cmsmailer because i don't like the
implementation in the frontend like it is. so i will look if it only a old code
and need to be updated.


      
avatar
Date: 2012-10-08 04:24
Posted By: Krisztian Kishazi (kishman155)

Fixed wrong code in Frontend.
RC2 released

Also the links in the mailnotification was fixed.


      
Updates

Updated: 2012-10-08 04:24
version_id: 29283 => 29798
state: Open => Closed

Updated: 2012-08-25 14:47
resolution_id: => 6
assigned_to_id: 100 => 116