TYPOP3 powermail: why email to receivers is not send? - typo3

I have a TYPO3 website v10 and using powermail forms.
The test mail in installtool is send good.
The mail to user is send good.
The mail to receivers is not send. This is very strange.
Here is my settings from localconf file:
'defaultMailFromAddress' => 'contact#company.gmbh',
'defaultMailFromName' => 'contact#company.gmbh',
'defaultMailReplyToAddress' => 'contact#company.gmbh',
'defaultMailReplyToName' => 'contact#company.gmbh',
'transport' => 'smtp',
'transport_sendmail_command' => '/usr/sbin/sendmail -t -i',
'transport_smtp_encrypt' => false,
'transport_smtp_password' => '123456789123456',
'transport_smtp_server' => 'smtp.office365.com',
'transport_smtp_username' => 'admin#company.gmbh',
Can you please give me some idea why is the email to receivers never works?

Things you should check:
what is the sender address of the mail which is sent to the receiver? You should avoid to use the email address from the form data as sender address because most mail servers check SPF records nowadays. Better use TypoScript to set a static sender address like info#company.gmbh or no-reply#company.gmbh. To increase comfort for the receiver you could set a reply-to address. See here for details how to do that.
is the subject really set? If it's empty no mail is sent.
To track problems further I suggest to use a local development environment like DDEV which provides Mailhog out of the box to intercept all mails which are sent from the webserver. This helps a lot to test mails.

If your receiver mail is sent as Bcc: you might have hit an incompatibility of symfony/mailer (which TYPO3 uses from v10+) used with sendmail -i -t (symfony/mailer issue).
You can work around it by using transport_sendmail_command = /usr/sbin/sendmail -bs.
This TYPO3 issue explains it, too.

Related

Change Cakephp Email Sender name

I'm using Gmail smtp in Cakephp to send emails.
And I wanna make the sender as what i defined.
I've tried
$email->from(['test#gmail.com' => '通知用メールサービス'])
and
$email->sender('app#example.com', '通知用メールサービス')
but none of it worked.
So is it impossible to change or i did something wrong?Thank you
sorry for my poor English.

Powermail doesn't send mail

I have installed powermail extension 4.4 on typo3 v7.6 project, the test mail is sending good, but when I fill the form on frontend and click submit, no e-mail is delivered/arrives.
I configured the form in backend with name, e-mail, and subject for both receiver and sender.
I have used different e-mail addresses too.
I have also tried to disable the spamshield from typoscript : spamshield._enable = 0.
I have added a defaultEmailAdress in the installtool config : [MAIL][defaultMailFromAddress] .
Does anybody have another idea?
Whats in your LocalConfiguration.php ?
'MAIL' => [
'transport' => 'sendmail',
'transport_sendmail_command' => '/usr/sbin/sendmail -t -i ',
should mostly work fine. But maybe you need to change transport to smtp or something else?
What really works good for me is the setup with Mailhog, to try Emails in Development.
I have fixed that, the problem was that i have used an different email adress in the plugin different from the adress in the smtp setting of installtool, this is was wrong, i have to use the same adress.

CakePHP Email changing from address on SMTP

I have this email config to send via SMTP through our Google Apps Business Account.
class EmailConfig {
public $default = array(
'host' => 'ssl://smtp.gmail.com',
'port' => 465,
'username' => 'myemail#mygmaildomain.com',
'password' => 'secret_password',
'transport' => 'Smtp'
);
}
When I send an email doing this:
$email = new CakeEmail('default');
$email->from('no-reply#mygmaildomain.com', 'My App');
$email->to(array('recipient#mygmaildomain.com' => 'Recipient Name'));
$email->subject('Test Email');
$email->emailFormat('html');
$email->send();
The email gets delivered, but it sends the mail from: myemail#mygmaildomain.com and not no-reply#mygmaildomain.com.
Is there another setting that I need to use or is this not possible?
EDIT:
I've tried the solution provided in the comment below, however it still doesn't make the email come from no-reply
When using Google's SMTP server, the from header is ignored.
$email->from('no-reply#mygmaildomain.com', 'My App'); //Ignored by Gmail
From DigitalOcean's tutorial How to use Google's SMTP server:
NOTE: Google automatically rewrites the From line of any email you send via its SMTP server to the default Send mail as email address in your Gmail or Google Apps email account Settings. You need to be aware of this nuance because it affects the presentation of your email, from the point of view of the recepient, and it may also affect the Reply-To setting of some programs.
For this to work, you have to modify your mail settings in your Google Apps control panel:
Workaround: In your Google email Settings, go to the Accounts tab/section and make "default" an account other than your Gmail/Google Apps account. This will cause Google's SMTP server to re-write the From field with whatever address you enabled as the default Send mail as address.

Emails sent through joomla go to SPAM folder

I am using the latest Joomla build for my website.
Allso we use a DNS record for having the mail delivered to our own server instead of the server on which the website is hosted.
I have used several contact form components, but every sent mail goes to my SPAM folder.
After searching hours on the web (and getting linked to this site frequently) i decided to make a new post.
It does not matter if i use the standard joomla forms, or any component.
Whenever a user fills in a form on my website, the email gets sent. The user receives a copy of its message, and i receive the message of the user. However, this message gets thrown in the spam folder, as phishing.
The sender of the mail always is: username#nameserver.i3d.net; namens; websitename
What do i have to change/enable/disable for this to work?
Thanks in advance.
Patrick.
(Sorry, I'm new to Joomla, but it uses PHP, so this may apply. Also this answer got a little long...)
It might be an issue with the email headers. A lot of email clients will automatically spam-box all mail where the address in the From: header doesn't match the envelope sender. As an analogy, you might not trust a snail-mail letter signed "Your Rich Uncle", mailed in an envelope with a Nigerian return address. Also if your envelope sender has a different domain than the one the email is actually sent from, that's another quick ticket to the junk bin. For more info about Gmail's message blocking policies (and general good practices), you can try this help page.
Here's some basic PHP email-sending code:
$to = $userEmailAddress;
$subj = $emailSubject;
$mesg = $emailMessage;
$headers = implode("\r\n",array(
"MIME-Version: 1.0"
,"Content-type: text/html;charset=iso-8859-1"
,"From: WEB_ADMIN_NICE_NAME <WEB_ADMIN#YOURSERVER.COM>" // *** 'From:' header
));
$from = "-fWEB_ADMIN#YOURSERVER.COM"; // *** envelope sender
if(!mail($to, $subj, $text, $headers, $from)){
//Some error handling...
}
On the first line I commented, you'll want to replace WEB_ADMIN_NICE_NAME with the name you want the email recipient to see (e.g. "Bill Gates"), and on both lines, replace WEB_ADMIN#YOURSERVER.COM with the actual return address (e.g. "da_boss#microsoft.com"). Note: whatever address you choose for the return address is where users' replies will be sent.
To reiterate, make sure both lines have the same return address (though the nice name can be anything you like), and make sure that the actual server sending the mail is in fact located at YOURSERVER.COM.
Lastly, I'm not sure where Joomla does its mailing, but if you're totally lost, you can try grepping with -lr for 'mail[[:space:]]*('.
there are several reasons that could make your email look suspicious to spam filters; to find out which head on to:
http://www.mail-tester.com
grab the email address and send an email from your website to it.
Then go back to the page and it will tell you what's wrong.
btw I'm struggling with the same issue,my problem being that on Joomla 2.5.9 apparently when you send html emails, a text-only copy is not added to the message, which is considered "spammish behaviour"
The problem is the i3d.net email address. My personal experience is that their network (31.204.154.0 - 31.204.155.255) is a significant source of spam and they do not action abuse reports. I suggest changing your hosting company.

cakephp emails not working

my problem is:
in the controller I have:
var $components = array('Email');
the method to send emails looks like this:
function send_emails() {
$this->Email->from = 'Somebody <somebody#example.com>';
$this->Email->to = 'Somebody Else <myspamplace#centrum.cz>';
$this->Email->subject = 'Test';
$this->Email->send('Hello message body!');
}
I am using Cake 1.3 and running it on localhost with Apache 2.2.11 and PHP5. Do you guys have any idea why it doesn't work?
When I put
$this->Email->delivery = 'debug';
in the code, it displays the email info and it seems like everything is ok.
Do you have any ideas what can be the reason why it doesn't send email?
If you're developing on a remote server, i.e. a hosting server, then that should work as it'll pick up the default email.
As you're not, you have to give the mail component some email capability. You can do this by, for example, feeding in your gmail (or whatever) smtp details, i.e. server, login, password.
/* SMTP Options for GMAIL */
$this->Email->smtpOptions = array(
'port'=>'465',
'timeout'=>'30',
'auth' => true,
'host' => 'ssl://smtp.gmail.com',
'username'=>'your_username#gmail.com',
'password'=>'your_gmail_password',
);
/* Set delivery method */
$this->Email->delivery = 'smtp';
See http://book.cakephp.org/view/1290/Sending-A-Message-Using-SMTP
If you're not sure what credentials to use, look it up in your email provider's help or faq. Typically it can be found by searching for how to set up Outlook or Thunderbird.
Are you sending from a windows server? If so, have you properly setup your MTA in the php ini? Can you send mail using the mail() function?
If you are on windows and need an MTA, hMail is great for development, note that many hosts will reject mail from your local machine a spam so don't use on production without an MX record, domain keys etc.
You need an SMTP server to send email. If you are trying to send it from your localhost, two good alternatives are:
FreeSMTP: A Windows-based tool that lets your computer act like an SMTP Server
Gmail: You can use your Gmail address for testing purposes.
You need to follow the instructions to send email using CakePHP through SMTP. You could also modify your php.ini settings to reflect the new settings.
I had the same problem, I forgot to enable ssl on my xampp server, for that it is necessary just to add(or uncomment) extension=php_openssl.dll line in your php.ini file. Hope it helps.