Project

General

Profile

Actions

Bug #25029

closed

defaultMailFromName not used when defaultMailFromAddress is used in mailform

Added by Christian Tauscher about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2011-02-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The content type (CType) is "mailform".

Settings in localconf:

$TYPO3_CONF_VARS['MAIL']['transport'] = 'mbox';
$TYPO3_CONF_VARS['MAIL']['defaultMailFromAddress'] = 'defaultMailFromAddress@*****.*****.**';
$TYPO3_CONF_VARS['MAIL']['defaultMailFromName'] = 'defaultMailFromName';
$TYPO3_CONF_VARS['MAIL']['transport_mbox_file'] = 'typo3mbox';

The resulting Mail in mBox:

From defaultMailFromAddress@*****.*****.** Mo 14 Feb 2011 11:00:43 CET
Message-ID: <1297677643.4d58fd4b47104@*****.*****.**>
Date: Mon, 14 Feb 2011 11:00:43 +0100
Subject: Kontaktformular
From: "" <defaultMailFromAddress@*****.*****.**>
To: crtausch@t*****.*****.**
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="_=_swift_v4_12976776434d58fd4b402ef_=_"
X-Priority: 3 (Normal)
X-Mailer: TYPO3
X-Mailer: TYPO3

--_=_swift_v4_12976776434d58fd4b402ef_=_
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

ANREDE: Herr
VORNAME: bli
NACHNAME: bla
...

As you can see, the From ist missingthe name.
same Result with $TYPO3_CONF_VARS['MAIL']['transport'] = 'mail';

Create mailform with "name" or "from_name" field, but with "email" or "from_email" field. The defaultMailFromAddress mail address is used, but with the name from the form.
If no name is entered in the form the senders name is filled with two double quotes.

(issue imported from #M17574)


Files

17574.patch (2.59 KB) 17574.patch Administrator Admin, 2011-02-20 15:01

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #24222: The new Swift Mailer should be used by TYPO3 for sending all kinds of mailClosedJigal van Hemert2010-11-28

Actions
Actions #1

Updated by Christian Tauscher about 13 years ago

if your Form-konfiguration contains e.g.

label 1 | name=input
label 2 | email=input

then the send email ist sent by name <email>. Works as expected.

If The content type (CType) is "mailform".

Settings in localconf:

$TYPO3_CONF_VARS['MAIL'] defaults are set, and eg the form is the Following:

label 1 | name=input
label 2 | Email=input

Then the send mail ist sent by name <default email address>, the parts are mixed up, depending what is given, missing.

This may be a bug, depends on your point of view. For me ist a bug.

Actions #2

Updated by Jigal van Hemert about 13 years ago

The defautl from-address is only used as a last resort. The mailform tries to use either the field 'from_email' or 'email' as the email address of the sender.
With the new Swift Mailer library it's vital to have a proper sender address, otherwise the mail will simply not be sent.

We found it important to make the utmost effort to send the email, so without a valid sender address we will use the default from-address set in the Install Tool options.

As sender name either the field 'from_name' or 'name' will be used. As you have seen, without a sender name the mail will still be received.

Can you explain the added value of showing the defaultMailFromName instead of no name when no usable name could be found in the form?

Actions #3

Updated by Christian Tauscher about 13 years ago

Its clear why a fallback is defined. but it should not be mixed up:

the EMail could be sent by "name of formfiller <email of form reciever>" (and vice versa). Which is a valid Email, but wrong: cause Formfiller is NOT member of the recivers Company. So this is a Bug.

I don't know the mail-RFC's, but I think to send a valid E-mail its enoug to have a E-Mail address. The name is optional?

if so: mailer should use complete sets:
a) Form values given: either (name AND Email) or (only Email) of FormFiller
b) Form values NOT given: either (name AND Email) or (only Email) of default values
if only e-mail is known, the this should be enough.

Can you explain the added value of showing the defaultMailFromName instead of no name
when no usable name could be found in the form?

What do you mean. Sorry I dont unserstand the question - really, my bad english.... :-(

Hope this helps.

Actions #4

Updated by Jigal van Hemert about 13 years ago

I now see two changes:

- if no valid email address of form filler is found, use default from name and address
- if no from name is found, only use email address (instead of empty name)

I will make a patch for this.

Actions #5

Updated by Christian Tauscher about 13 years ago

Nice to her this. But please dont forgett the first part of my question:

From: "" <defaultMailFromAddress@*****.*****.**>

Even if default names are given, this name is dropen somewhere an actualy NO name is set al all.

Actions #6

Updated by Ernesto Baschny about 13 years ago

Committed to:
- trunk rev. 10601
- TYPO3_4-5 rev. 10609

Actions

Also available in: Atom PDF