smtp mail settings not working in moodle 2.6 - smtp

I am using moodle2.6.2 with essential theme.
I have created the smtp settings with gmail account, it was working fine.
If i changed my webmail account ,it shows the error like this,
"Sender address rejected: not owned by user rathish#mywebdomain.com".
Anybody can help me ?

I wouldn't recommend using Gmail or Google apps for sending emails from Moodle.
Gmail has a daily limit for sending emails and it won't allow sending emails from aliases - the email account has to exist.
http://docs.moodle.org/26/en/Email_setup_gmail
Check with your web host, they will probably have smtp - but also check their email sending limits too - I've had a site suspended because because too many emails going out.

Related

Setting up mail smtp relay service to send and receive mail

I have very limited knowledge about SMTP and IMAP/POP. SMTP --> sending message, IMAP--> Mainly for receiving messages.
I have a woocommerce website and i already did setup my email system to use SMTP relay using zoho. I believe zoho also provide mailbox services since I am able to communicate with my customer(both two and fro) using its email service. They have their app and i can receive and send mail from that app. Obviously, I have set up all the records including MX to send/receive the email to my zoho inbox.
No i want to move my email services to postmark or like sendinblue. All i can see the setting related to sending the mail but how/where will I receive the mail when user reply on that??
On the postmark website it says:
Since Postmark is not a mailbox provider there's not the ability to generate mailboxes for receiving email using IMAP or POP3.
Question 1) Does the SMTP relay server is actually a different physical machine from IMAP server for sending/receiving messages. I guess both are different but why are these companies not providing solutions like zoho. Pardon me if I did not understand the use case.
Question 2) What to do in this case ???. My case is simple. I send notifications to customers regarding their orders. If they want they can reply or enquire. I receive the email on my phone and I can reply on the same mail-chain like we have on Gmail.
Question 3)
Do i need to buy some another service along with these to receive and reply back on the email ??? Like from godaddy or somewhere else.

How to add new 'From' email id each time sending email using PostFix server

I am new to PostFix and have setup PostFix as a server recently. In the testing, PostFix is working fine and relaying the emails with 'From' email address stored in the PostFix credentials files likes admin#mydomain.com and password : xxxxxxx
My problem is: We have a web application that allows direct email sending feature between the website users. As User 1 can send email to User 2 (user2#example.com) and vise verse. But while sending emails using the PostFix server, the user2 will always receive the admin#mydomain.com instead of user1#example.com so the user2 can not reply on the email directly to the user1.
This problem is a bigger one as we have thousands of the users that are waiting for this feature. So if someone can help me configuring the PostFix server so that at the time of sending email, user can set their email id as the 'From' field of the email using any web form and the receiving user will get the email as the email was originally generated by user1#example.com so that he can reply directly to the user 1 on his email id.
I have done some research work on the PostFix about this problem but did not find much interesting one. The approach others followed are using the smtp_generic_maps but this can work only with a limited set of email ids stored in the >>/etc/postfix/generic. But we want this solution fully dynamic so that any user can add the FROM as his/her email while internally the email will be sent using the admin#mydomain.com in PostFix.
Early response is much appreciated.
Thanks
Finally I fixed this issue by using an Grails application which doesn't require for adding fixed emails in the PostFix.
Use the Grails Mail plugin and set PostFix server as the default Mail server.
Also add inbound connection in the Postfix so that other email services will not ban you.
As well as change the port from 25 to some other port as Port 25 is being used to send Trozen horses and spamming ..
I love PostFix now.. Enjoy free mail service for your small business.
Thanks

Issue Sending Mail via SMTP

My iOS application uses Mailcore to access a user's email account. Sending and receiving is done via SMTP and IMAP, and both processes work as expected for Gmail and Outlook (which both use OAuth for login).
I just added Yahoo (as well as some other providers to the app who do not use OAuth) and for all of these providers I am having an issue specifically with sending messages.
The issue is that although messages DO get sent successfully from my application, they do not appear in the sent folder on the web for the provider.
For example, if I log into my Yahoo account in my application, and send a message to my Gmail account, the message appears in my Gmail inbox on the web, but not in my Yahoo sent box on the web.
I tried adding Yahoo to the regular mail app on iPhone and sending a message from this account - this worked fine - the message shows up Yahoo sent box on the web. So, I then compared the headers of the two messages (the one sent from mail app and the one sent from my app) and the only obvious difference I see is in the line 'X-Rocket-Received':
Mail App:
X-Rocket-Received: from [11.180.250.219] (userName#71.208.72.234 with xymcookie [216.39.61.254])
by smtp203.mail.ne1.yahoo.com with SMTP; 23 May 2014 08:19:54 -0700 PDT
My App:
X-Rocket-Received: from (userName#118.41.27.139 with plain [98.138.105.21])
by smtp214.mail.ne1.yahoo.com with SMTP; 23 May 2014 08:58:29 -0700 PDT
Can anyone answer any of the following questions for me:
1) What does X-Rocket-Received mean?
2) What is the significance of "with xymcookie" versus "with plain"?
3) Is my issue likely to do with my not having an xymcookie?
4) Where might I begin to solve this issue?
Many thanks.
Additional information:
It was placed there by some server along the way. It is a non-standard header. It appears similar to a standard SMTP Received header though.
'xymcookie' is a non-standard authentication method used by Yahoo. It is not, as far as I can tell, publicly documented.
No.
See Remy's answer. Use IMAP Append for most servers. Gmail does not require it, but that is non-standard.
Sending an email with SMTP directly does not put the email in the provider's Sent folder. You have to log into the provider with IMAP and put a copy of the email into the Sent folder as a separate operation. Higher level apps, like iPhone's mail app, handle these details internally.

Settings for sending email with PHP using GMail SMTP server for my domain

I run my business email through Google Mail, using my own domain (i.e. my email address is 'info#mydomain.com'). I've recently set up a support forum on my website which needs to send emails from the site admin via a PHP script. However, none of the settings I've tried seem to work. I thought these would work but they don't:
SMTP server: smtp.mydomain.com
SMTP username: info#mydomain.com
Password: test123
I've also tried setting up a different email account on my domain on the server and using the server IP and settings for this different account but I can't get this working either.
Can anyone suggest how to get this working? Do I need to use Google's own SMTP settings as opposed to those for my domain?
I don't know much about this so apologies if it's a dumb question - I've tried searching but can only find examples where people are actually using GMail as their email account rather than their own domain.
Thanks
This turned out to be an issue with WHMCS, which they have apparently since resolved (although it was a show-stopper for me at the time so I wasn't able to see the resolution through).

Sending emails through SMTP and testing

I've got a PHP app with an invitation system where users can invite other users to try the service. Internally we use google apps for our domain to send/receive emails (mydomain.com).
1) My question is, can I send emails from my server with the from address being invite#mydomain.com? I am worried about the emails being blocked/ignored by the destination server. I am aware that it is possible to send the emails by configuring my php installation to use google smtp server, but there is a limit of 500 emails a day, which is not very scalable.
I don't really know that much about sending emails and why/how they are blocked/considered spam. I'd appreciate any good advice/tips you can give me.
2) What is a good way to test to see if the email portion of my app is working without installing it on my live server. Can I just setup an smtp server on my desktop and send mails this way? Can you recommend any other good ideas for testing. I'll basically be sending just a few emails to my personal webmail accounts to make sure that everything works.
Thanks,
Bill
1) My question is, can I send emails
from my server with the from address
being invite#mydomain.com? I am
worried about the emails being
blocked/ignored by the destination
server. I am aware that it is possible
to send the emails by configuring my
php installation to use google smtp
server, but there is a limit of 500
emails a day, which is not very
scalable.
I don't really know that much about
sending emails and why/how they are
blocked/considered spam. I'd
appreciate any good advice/tips you
can give me.
There is a way track if mail has been bounced (there are more than 10 possible bounce reasons!). You can set the return-path header in your outgoing emails. Best practice is to specify a different mail address in the return-path. When e-mails are getting bounced for whatever reason, a notification will be sent to this address. Additionally you can have for example a (PHP) cron job that connects using IMAP to the bounced email account and do something with the bounced e-mails. This is a pretty reliable way to track the status of your sent emails.
Additionally, in order to minimize the chance your e-mail will get blacklisted you could think about signing your e-mails using a certificate (you can get one for free for personal usage. A commercial one may cost you around 25 dollars a year)
2) What is a good way to test to see
if the email portion of my app is
working without installing it on my
live server. Can I just setup an smtp
server on my desktop and send mails
this way? Can you recommend any other
good ideas for testing. I'll basically
be sending just a few emails to my
personal webmail accounts to make sure
that everything works.
You can actually send a test email from everywhere as long as the outgoing SMTP port (25) is not blocked. If you have an own smtp server with username/passwd authentication enabled, you will be able to send e-mails from everywhere using the these credentials/settings. In all other cases, you will have to use the smtp of your internet provider to send emails.
To address the second part (as Eric pointed out, you'll have better luck at serverfault.com with the first part), any locally hosted SMTP server should be able to do the trick, and there are plenty available for any given OS. Google can help you there.
The main thing you'll want from a local SMTP server is detailed logging. It's entirely possible that the local server could fail/refuse to deliver the message to its intended destination for any number of reasons (again, serverfault.com), but that's outside the scope of testing the code's delivery of the email to the SMTP server.
If it does properly forward the test message to you, great. But if it doesn't, you just want to be able to see in the server's logs that it received the message correctly and was able to process it. Whatever that processing accomplished is a separate issue.
For email testing I use Pappercut. It's easy to use but some antivirus may not like you opening port 25.
I use Dumbster for testing. I will catch the emails, then my test code can check the content.
To avoid spam, there are a number of things you have to do, and I'm not sure I've found them all. Make sure that your IP is registered, and that a reverse lookup returns the right domain.
1) Sending:
This is a good article describing some of the pitfalls around sending email http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html
Check out the comments too.
2) Testing:
Disclaimer - I work for the company behind the service linked to below.
If you would rather not set up your own smtp server you can use a hosted email testing service like Clickity
You can create as many test email addresses as you like or configure your app to point directly at our smtp server. You can then view the complete email on our site as part of your manual testing or automate the tests it via our API.