Everything in the title! Just want to know if it's possible or not to change the mail subject, I'm working with Symfony2.6 and the Elao\ErrorNotifierBundle to send error mails in the prod environment.
Thanks!
It doesnt look like there's an option to change the e-mail subject.
However you can manually change the subject to your liking, in the Notifier class.
https://github.com/Elao/ErrorNotifierBundle/blob/master/Listener/Notifier.php#L306
Related
I can not solve the problem of spam. I only have 7.6 / 10 on Mail-Tester.com.
I specify that I use postfix, and I need it only for the sendings.
Here is my result: https://www.mail-tester.com/web-n0z33
Mail-Tester.com tells me that the problem come from ReplyTO… But I am obliged well to use ReplyTO so that I can click "to answer" when I receives an e-mail sent since a form of contact of my Web site.
I also specify that FROM I put an email address #my-domain.fr. Because if in FROM I directly put the email address of the visitor who fills my contact form I have even worse errors with Mail-Tester.com.
And here is my PHP code:
$mailer = new Mailer();
$mailer->setFrom(contact#mondomaine.fr)
->setReplyTo('emailexemple#gmail.com')
->setTo($_GET['mail'])
->setSubject($data['subject'])
->setBody('front/specific-page/contact/contact-html', $data)
->addBodyText('front/specific-page/contact/contact-text', $data);
var_dump($mailer->send());
I use SwiftMailer with the driver at 'mail', but I created my own adapter so that's why I have this code. But it is easy to understand.
How to solve my problem? How to have a 10/10 rating with Mail-Tester.com?
Thank you very much.
I am sitting with the same problem. Currently, from what I have found on the net, you can not "fix" this. However, there are some ways to help resolve it. Here are a few options you can try, based on these references:
Ref 1
Ref 2
They both say the following:
"Wrap mail messages in HTML tags to avoid spam filters."
The FROM address must be those from the visitor who uses the contact form. How would you else respond to the email? And why even use a tool to test the spam score of an email sent with a contact form? You are the only receiver of those emails.
The 10/10 rating with Mail-Tester.com is telling you only, that Mail-Tester thinks, that your email is just fine. I would not rely too much on this tool. All email service providers have anyway own spam filters and will handle your email as they see right. For instance, if you test your email with another tool like https://www.emailchecky.com, you will mostly see other results and found errors.
Or make another test:
You can send the email also to a Gmail address and see if the email is landing in the main inbox or the spam folder instead. Gmail has the most aggressive spam filters and rules I know. If your email will pass these rules and filters you can be proud of your email.
I need to modify the headers of mail to have look like it's being sent from an external address.
I have problem in sending mail from same domain. For example,
A(abc#aura.com) send mail to B(xyz#aura.com)
When A send mail to B. B is not able to get mail because of same domain issue. I spent lots of time but nothing helps. Somehow i find that modifying header I can achieve my solution. Here i find little bit solution
link. But I don't know how to modify it.
I try something like:
$mail->setFrom('abc#aura.com', ucfirst($sende_name[0]));
$mail->Sender='abccd#aura.com';
But nothing helps.
Any help please.
Can someone please explain how Magento(1.9.0) email sending works. I can't seem to find where the file for sending email from a contact form is. I see that the action attribute of the form points to "contacts/index/post/" but I can't seem to trace it.
Also cannot find the mail log or the which module or service magento uses to send the email itself.
I am trying to use external smtp server for multisite Magento and I need to do some custom logic and not some extension.
Please go to app\code\core\Mage\Contacts location to see all the logic of contact.
It is used to send email or anything related to contact.
Also, if we want to change any contact settings then go to system> configuration> contacts(under general tab).
Let me know if anything else you need to know.
Cheers!!
Are you that programmer that knows all about emails? Can you dream about mail headers, write them with your eyes closed? Maybe you might be able to help me with this issue.
Let me explain ...
Workflow
The mail server receives emails
A PHP cronjob imports all emails from IMAP into the MySQL database
The user finds all emails in the Inbox in my application
Sending an email
In that same application a user can send new emails. I've handled that using the following code snippet.
$message = \Swift_Message::newInstance()
->setSubject($form->get('subject')->getData())
->setFrom('me#example.com')
->setTo($form->get('to'))
->setBody(
$this->renderView(
'MailBundle:Email:contact.html.twig',
array(
'ip' => $request->getClientIp(),
'name' => $form->get('to')->getData(),
'message' => $form->get('message')->getData()
)
)
)
;
This works fine. If the above email is submitted I create a new email in the IMAP sent folder. This, on his turn is being imported by the PHP cronjob and put in the MySQL database. It shows up in the sent folder in my application.
The issue
Now that you have a general idea of how my application works I've got some things I am not so sure about.
How can I create replies to imported emails using SwiftMailer.
How can I forward imported emails using SwiftMailer
I would like to use my application as a real mailclient and want the mail headers etc. to be correctly set.
I could of course just send an email with the original mail body and the subject prepended with "RE:". But I am not sure if that's all. I somehow suspect I need to do alot more.
In short
How would I use SwiftMailer to reply to or forward an email that is saved in a database?
Update
I implemented the reply headers as suggested in an answer to this question. I'm not sure however if this will work for the forwarding as well. I just wanna make sure that mail providers won't block my emails because the headers are incorrect.
I compared what are the differences in the header between a "first" email and a reply.
To make a reply, it seems you've to add two lines in the reply header :
In-Reply-To: [Message-ID] (with Message-ID found in the header of the first mail)
References: [Message-ID]
Obviously, you have to change the from and to in the reply email. (I think SwiftMailer creates others by itself)
To add line in email header using SwiftMailer, proceed like that :
$headers = $message->getHeaders();
$headers->addTextHeader('In-Reply-To', $previousEmail->getHeaders()->getMessageId());
This getter I put is just how I imagine your email entity.
For the forward, juste print the source of an email and check differences.
Hope it could help.
Update :
For a forward : it is exactly the same thing. I just compared the two headers.
You've to add In-Reply-To and References.
And to answer your update : You can put anything you want (string obviously) in an email header. The spam score will not grow up if you add an unknown variable in it.
I am wondering if there is a way to send a quick email to my leads on gmail. I want to send each message to store them in the sent folder, I know that it can be done by create each compose message but it will give me the hard work to send the emails to each user and I don't like to use BCC because when I receive the emails from the users, I will only see one message in my inbox. I want to receive each email from each user.
Example:
http://oi57.tinypic.com/ztiy5f.jpg
I don't like to receive the email like this:
http://oi60.tinypic.com/4gl11e.jpg
Is there a way to do that through on VB6, PHP, gmail or whatever it is?
Sending mail using PHP, for example. It's not as easy as it used to be.
The sending part, is trivial. Most of the time folks use the mail command, pass parameters to it, and voila.
However, with today's overachieving spam filtering via ISPs, etc. -- Chances are very good that your email might not ever get received at its intended address. It might get there, most likely will be sent to spam, and can have several hours of delay.
The best way to send email, as far as I know, is with SMTP email in PHP. PHP mail vs SMTP