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.
Related
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.
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.
I've same problem like here. But still not able to solve it.
I've followed steps from here. but doing so doesn't sends mail.
The log file says: Mail is sent. but at the other side mail is not received.
Any ideas why?
Check your SMTP settings and make sure you have defined the right settings for your e-mail host. If you are using a sender e-mail other than Gmail then your settings will be different to the ones used in the Railscast.
The file to check is here: config/initializers/setup_mail.rb.
Edit: It still may be possible that the settings you used in jsp may not match perfectly with the 'phrasing' that Rails expects in the setup_mail.rb file. I have frequently come up against this problem where a slight difference in what SMTP settings you mention / don't mention / how they are worded will determine whether the e-mails send/receive or not.
If your logs show the e-mail is sending to a valid e-mail address (and you are not receiving those e-mails in your inbox or spam filter) then the problem, as far as I know, is most likely to be your SMTP. My advice is to check online for the Rails-specific SMTP settings for your e-mail provider, or in the case that you cannot find them, try different combinations until you find the correct one.
Okay the problem is solved. Problem was my file corresponding to action was not at proper place. Here is quick view on how to do it:
Add following to actionmailer:-
def send_mail
attachments['1.pdf'] = File.read('c:/1.pdf')
mail(:to => "harsh#xyz.com", :subject => "xyz", :from=>"harsh#xyz.com")
mail.deliver
end
Notes:- Make sure that the smtp settings are correct and the file corresponding to the action (In this example send_mail.rhtml) is present under appropriate folder.
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.
How do you send the content of a website form to an email address without disclosing the email address to the user.
Thanks!
PS: If at all possible, I would like this to be in HTML JavaScript Ok, anything I guess.
Not possible. You can however put a "fake" from header in the mail. You'll only risk it to end up in the junk folder.
HTML doesn't provide any functionality to send mails. You'll really need to do this in the server side. How exactly to do this depends on the server side programming language in question. In PHP for example, you have the mail() function. In Java you have the JavaMail API. And so on.
Regardless of the language used, you'll need a SMTP server as well. It's the one responsible for actually sending the mail. You can use the one from your ISP or a public email provider (Gmail, Yahoo, etc), but you'll be forced to use your account name in the from header. You can also register a domain with a mailbox and just register something like noreply#example.com and use this to send mails from.
Update: JavaScript can't send mails as well. Like HTML it's a client side language. You'll need to do it with a server side language. All JavaScript can do is to dump the entire page content back to the server side. jQuery may be useful in this:
$.post('/your-server-side-script-url', { body: $('body').html(); });
with (PHP targeted example)
$to = 'to#example.com';
$subject = 'Page contents';
$body = $_POST['body']
$headers = prepare_mail_headers();
mail($to, $subject, $body, $headers);
Update 2: if you actually want to hide the to header in the mail, then you'll need to use the bcc (Blind Carbon Copy) instead. This way the recipient addres(ses) will be undisclosed. Only the from, to, cc stays visible.
If you mean doing so on a client side, using mailto: link - you can not.
If you mean any way, yes - you submit the form contents back to your server, and have your back end script send the email.
You can do the form in HTML, but the posting will need to be done in a script. Even if you don't expose the email address, the script can be used to spam that email address. This is why you see captcha being used in such cases.
There are scripts available for most languages. Check to make sure their are no known security problems for the scripts. The original Matt's script in perl had problems, and the Perl community created a more secure version.