CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #3549

Wrong Sender E-Mail Address for confirmation-mails

Added by Nico Thomaier almost 4 years ago. Updated over 2 years ago.

Status:Needs Feedback Start date:2009-06-03
Priority:Should have Due date:
Assignee:Alex Kellner % Done:

0%

Category:-
Target version:-
Votes: 0

Description

The Extension sends the confirmation Mail with the sender E-Mail-Address of the Form user.
Some Mailservers won't accept this and refuse to deliver the mail.

So it would be nice to have a TYPOSCRIPT option to overwrite this behavior.

I programmed a bugfix wich looks like this:

File: class.tx_powermail_optin_submit.php

line 68: replace

$this->sendMail();

with
$this->sendMail($this->conf);

in line 113 replace

function sendMail() {

with

function sendMail($conf) {

so we have access to the TYPOSCRIPT settings in this function.

in the Function sendMail around line 140 replace

$this->htmlMail->from_email = $this->obj->sender; // sender email address
$this->htmlMail->from_name = $this->obj->sendername; // sender email name
$this->htmlMail->returnPath = $this->obj->sender; // return path

with

if($conf['tx_powermailoptin.']['email.']['from_email'])
  $this->htmlMail->from_email = $conf['tx_powermailoptin.']['email.']['from_email']; 
else $this->htmlMail->from_email = $this->obj->sender; 

if($conf['tx_powermailoptin.']['email.']['from_name'])
  $this->htmlMail->from_name = $conf['tx_powermailoptin.']['email.']['from_name']; 
else $this->htmlMail->from_name = $this->obj->sendername; 

if($conf['tx_powermailoptin.']['email.']['returnPath']) 
  $this->htmlMail->returnPath = $conf['tx_powermailoptin.']['email.']['returnPath'];
else $this->htmlMail->returnPath = $this->obj->sender; 

In the TYPOSCRIPT Configuration the used Variables must be defined

plugin.tx_powermailoptin.email  {
  from_email = noreply@wdev.local
  from_name  = Your Webserver
  returnPath = noreply@wdev.local  
}

sendername.jpg (21.2 kB) Alex Kellner, 2009-06-03 17:57

class.tx_powermail_optin_submit.php.patch - Patch for proposal by Heiko Hänsge (2 kB) Heiko Haensge, 2010-03-02 21:09

class.tx_powermail_optin_submit.php.patch - corrected Patch for proposal by Heiko Hänsge (1.9 kB) Heiko Haensge, 2010-03-02 21:36

Associated revisions

Revision 27352
Added by Bernd Schönbach over 3 years ago

[Bug 3549] createRedirectUrlWithoutRedirectUrlIsCurrentUri of the pi1 Testcase fails,r=oliver

History

Updated by Alex Kellner almost 4 years ago

  • File sendername.jpg added
  • Status changed from New to Needs Feedback
  • Priority changed from Must have to Should have

How does powermail work?
If you don't define a receive name, powermail uses the email address of the receiver as the name for the confirmation emails. Some systems don't like email addresses instead of names, so it's important to define the name!

How does powermail_optin work?
I'm not totally sure, but have you tried to set a name in the powermail receiver field?

In this case the sendername should be "conject Team"

Updated by Heiko Haensge about 3 years ago

Hello Alex,

as we also experienced problems with several mail servers not liking the receiver address as sender address in the confirmation mails.
So I had a look at it and wrote a patch for class.tx_powermail_optin_submit.php in typo3conf/ext/powermail_optin/lib.
The patch does almost do the same thing as the proposal of the bug reporter, but I discovered the bug report after I wrote the patch.
So at least my proposal should be attached to this report.

We introduce two new setups:

plugin.tx_powermailoptin {
  # Absender der Optin-Email überschreiben
  email.senderOverwrite = 
  # Absendername der Optin-Email überschreiben
  email.sendernameOverwrite = 
}

And we replace $this->obj->sender and $this->obj->sendername in class.tx_powermail_optin_submit.php in function sendMail() by a condition checking if the typoscript setup should overwrite them.
The patch is attached. I would be happy if it could make it in the extension code.

Cheers
Heiko Hänsge

Updated by Heiko Haensge about 3 years ago

A slightly corrected patch is attached. The sender of course should't get overwritten for the database entry.

Cheers
Heiko

Also available in: Atom PDF