Magento 2.0.2 mail not sending - magento2

All Mail is not sending from Magento 2.0.2. Mail function is enabled. I tested in index.php file. while testing the PHP mail function like mail($to,$subject,$message, $headers) mail is not sending. I am using Ubuntu server. Let me know anything we need to configure in my php.ini file or any thing else.

You will have to set cron job first, because Magento does not send email without setting cron.
You can send email which is not Magento default email.But when you want to send all Magento default email like order email, shipment email, customer etc then you have set cron first.

Related

Client settings need to be updated to Microsoft Exchange. For more info see https://x.co/client

I am using my email and password to send email using python script. But I am not able to send mail since past couple of weeks.
I debugged and found error.
Msg: b"Your message wasn't delivered because your client settings need to be updated to Microsoft Exchange. For more info see https://x.co/client"
on windows machine using outlook I also updated my email to Microsoft Exchange but still my problem is not resolved.
Can someone guide me on this?
Note: From outlook web and app email send/receive both are working fine. problem is only with script smtp.
Main Purpose is to use same details with flask-mail in flask project.
MAIL_SERVER="smtpout.secureserver.net"
MAIL_PORT=465
MAIL_USE_SSL=1
MAIL_USERNAME="______________"
MAIL_PASSWORD="______________"

Moodle email not get even after a success message

I can't get user verification mail even after a success message. My file permission is 755. It show success message with or with out an smtp setting. I think problem arises after my server change. But php mail function is working when I tested in separate file on server.Any Idea about this problem.
Please install test email moodle plugin and test email using that plugin. it will show the error if email fail.

Get recipient's email address from a json file in MUTT

So I am using MUTT on my Ubuntu server where I want to email a particular file to the user once he enters his email address in a webpage (hosted on the server).
I am storing his response as a .json file in the server but now I want to send email to the email address provided by him.
As far as i know, MUTT has a command to send the email to a recipient
mutt -s "Mail Subject" username#domain.com -a attachment.zip < mail_body.txt
What I want is, to get the username#domain from a file rather than hardcoding it.
Any leads on how to do this will be appreciated.
Thanks
Turns out that I had to create an executable script for this job.
I stored the email to a variable by using EMAIL=cat email.txt and then used this EMAIL variable as the recipient.

magento new order send mail not work

magento can send new user mail confirmation, newsletter subscription, invoice and shipment success but can't send new order mail and send order email to customer in admin panel.
in database core_email_queue is full of not sent emails
also i did:
sudo crontab -u www-data -e
and add:
* * * * * /bin/sh /home/salar/public_html/cron.sh
this is my AOE Scheduler:
http://i.stack.imgur.com/OiYcw.png
As of magento 1.9, emails are queued up and are sent via the cron job. If you haven't set this up, you can manually run it by pointing your browser to the file, e.g. http://www.yoursite/cron.php . After you run this, you should receive your emails
The extension AOE_Scheduler can help you in confirming that your Magento cronjob has been configured correctly and is running.

Mail Not Sending from My Server

I am having issues sending mail from my server, when I type in phpinfo() I get this:
Mail: /var/spool/mail/frank
...
_ENV["MAIL"]: /var/spool/mail/frank
The php file that I'm using the Mail function in is owned by Apache and has 775 permissions. Inside /var/spool/mail there is no apache file, but there is a file for every other user on the box. Do I need to change the php.ini? Or can I add in an apache file (perhaps duplicate the frank file and then rename)?
Any advice can help!
/var/spool/mail is where incoming unread mail is stored. There would be an 'apache' file only if the apache account has received mail.
Have you looked inside the MTA's log (usually /var/log/maillog) to see what's going on? If PHP's properly sending mail, there should be an entry in there for the mail being en-queued and what happened when the MTA (postfix/sendmail/exim/etc...) tries to forward it onwards.