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!!
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 am new in mailgun.
I just create mailgun account. And verified new DNS.
SMTP Hostname
smtp.mailgun.org
Default SMTP Login
postmaster#example.com
Default Password
e1dfdse34343wewe3232323232323wewewewe
API Base URL
https://api.mailgun.net/v3/example.com
API Key
key-53234545453trter334233e
Of course current some value is dummy value. And I create new route.
Recipient : demo#example.com
Of course I set actions. Like this: https://example.com/message
I thought when I send the email via mailgun, then any user can reply with this email.
demo#example.com
But I cannot send the reply email. In a nutshell I can send email, but cannot accept any email.
Not sure am I wrong.
I searched lots of methods, but all are speaking enable.
Not sure what am I missing.
Please let me know if you know on this.
Thanks.
I fixed this myself. This was simple issue. I set the MXA priority as 10. So it arouse the google. That is why I cannot receive any Email. I hope anyone will not meet this problems if he read this. Thanks.
A friend of mine and me developed an opencart payment module for a bank payment, meaning when you click confirm order, it takes you to the bank API. Everything works fine except for the fact that the following does not occur:
Payment does not effect on the dashboard
An emails is not received by the administrator even though we have used finfo#example.com and Finfo#example.com, I have included series of emails in the email field at the bottom of the page in the setting->mail tab->alert emails
All orders are being tagged as "Missing"
I tried cash on delivery and it worked fine (it sent emails)
I am on opencart 1.5.6 (boss theme goMarket)
Do you think setting an SMTP will do the magic? if yes, how can I get and set the SMTP from a GoDaddy hosted email acccount. I'd appreciate if you can help me with the solutions and where the errors may be coming from.
My guess is that you have a problem with the checkout/order controller.
Go to catalog/model/checkout/order.php and look into the confirm() function.
Something is probably making it fail because this is the function that handles both the database change from 'new' order to 'pending' as well as sending the email.
Under the confirm() function, look for $mail->send and simply comment out everything that has to do with sending the email. Then try to run a transaction. My hunch is that your problem is in the email sending syntax.
If that still doesn't work, you've got a bigger problem.
Try to debug this function row by row while using var_dump() on the variables and seeing the results. After few times you'll be able to see when exactly the function breaks and take it from there...
Regarding your question about smtp - it could be your settings, but from my experience if your settings are not correct, it will not break your code execution. What you are experiencing sounds like a php syntax error to me.
One more thing - sometimes smtp will fail when using a local environment like mamp or wamp so make sure that (a) your mail settings are correct (b) that you deployed the site, even if it's a temporary address.
And one last thing - go to Admin->Settings->Error Logs and look for clues.
Hope this help!
I'm a noob and seriously confused. I built a form for my website with a php script that validates and sends an email to me when someone fills it out. So, what is an auto-responder? Do I incorporate that some how with my php script, or do I not need the php script at all if I use an auto-responder? Thanks in advance
Autoresponder is automatic mail shooted back to the origin email box , it may contains information like "Thank you for email and will get back to you soon". It can be configured at the mail provider or you can also do the coding for the same. As any user submit the form and he has valid mail , just read his email id in the last and send him the thanks email immediately . Later you can see his feedback and reply again.
An autoresponder is used for automatically sending email notifications when something happens, like you just subscribed to something. Some web hosting companies such as GoDaddy offer autoresponder email features under cPanel. I'm pretty sure big names have them. Just configure it under cPanel. Another way to do this is having a local program check the database for new members and using the program to send email to the new members. I did the second option for educational purposes but the first one should be more efficient.
Well, I'm trying to create a newsletter, that will send emails to users in a database. The newsletter itself would draw "events" and other activities from a database. Whats the best way to take that list, and put them in an email? I was thinking about putting them into an html page, then sending an html email, but not all emails support html(like school email). What would your guys recommend? Could you point me to some good resources?
Also, this is for a school project, so I cant use any open source type stuff, unfortunately :(
You are correct in your assumption that if you are creating html newsletters, you will also have to do a text based version for clients that don't support html or ones that ask to have e-mail be sent only in text. You will need to make sure your code sends both versions to recipients. You could also ask the recipients for their preference and send them the specific version that they requested.
For html e-mail it is highly recommended to read the following two articles by CampaignMonitor (they specialize in e-mail marketing sofware):
HTML E-mail Design Guidelines
Guide to CSS support in email
clients
Note that I am assuming you are asking for help with the actual construction of the html for the email not the code needed to create and send the newsletter.
Good luck with your project.
==== UPDATE ====
So it seems that you actually need help in developing this project. Since this is a homework, I will provide some general advice that should steer you in the correct direction and get you started on the project. Then, if you have any specific problems with your code, you can ask about them on Stackoverflow.
There is really two things that need to be done here:
In PHP, dynamically contruct a variable that contains the html or text versions of the e-mail that needs to be sent.
Loop through your contact list and e-mail the contents of that variable.
Sending E-mail
I will start with the sending e-mail portion, because the links provide bellow also show you how to construct the message. Also, in your comment you said you already know how to contruct an html from a database. The following links show you two ways to send e-mail. You can either use the Mail function that comes with PHP or download the PEAR_Mail package. If you are allowed to use additional libraries and want to send html e-mail, I would recommend using the PEAR_Mail, because it makes things much easier if you want to send a both an html and text version of an e-mail together.
Note: To send an e-mail you will need to use some sort of mail server. If you are using Windows, you can install the SMTP service that comes with IIS or you can use an external smtp service such as google to send your e-mails.
http://www.w3schools.com/php/php_ref_mail.asp
http://us2.php.net/manual/en/function.mail.php
http://www.webcheatsheet.com/php/send_email_text_html_attachment.php
http://pear.php.net/manual/en/package.mail.mail.php
http://pear.php.net/package/Mail_Mime/docs
Construct E-mail
The complexity here will depend on whether you just want a plain text e-mail or html. For either case you will need to read the event data from your database and add it to the message that you want to send.
Some Seudocode:
Loop through datarows
message = DataRow[EventDate] + " " + DataRow[EventName] + "\n"
Loop through recipients
mail message
Hopefully this gives you a start. I would recommend getting php to send out an e-mail of a static html or text first. Once you have that code working you can start working on adding the functionality of reading event info from a database and sending it out.
Hope this helps.