Email from address changes once it is delivered - wordpress

I am currently doing work for a client and am running into a bit of an issue when an email receipt is sent to the user. What is happening is that once the email address is delivered the from address is completely different then the one I am using. I have tried using a few different email addresses and they work fine. It's only the one that they really want to use that is causing the problem.
I don't have access to their site and am also unsure of how the mail is sent. What I am wondering is if anyone knows the questions that I can ask to figure out what is going on on there end. They recently changed who was handling their site so I have a feeling something may be getting mixed up.
The site is built with WordPress and is using Gravity Forms. From the changed email address I can see that they are using Bluehost since the email changes from #companyname to #boxXXX.bluehost.com.
Email servers are not my area of expertise so I really appreciate any help.

Very likely their Wordpress website is sending emails through the wp_mail() function which is nothing more than the usual mail() function from PHP.
By default if you send an email through this method it will display either the hostname of the server where the website is sitting or the SMTP server, in this case boxXXX.bluehost.com depending on what's the policy of Bluehost regarding sending e-mails.
Generally hosting provider switch off the php mail() function in shared hosting environments to prevent spam and they provide you with the details to connect to their SMTP server and send legit e-mails, if their server is sitting on a shared hosting I think you might need support from Bluehost directly, explain to them the situation and they will help you throughout the process.
If the website is sitting on a virtual dedicated server then they need to do additional configuration on it. In this case what I do is to access onto cPanel and create a new mailbox with the address I want to send from (wordpress#domain.com, info#domain.com, whatever the client wants to be displayed) and configure Wordpress to send with through the VPS SMTP (you can do that easily with this nice plugin: http://wordpress.org/plugins/wp-mail-smtp ) with the address and password you chose when creating the email account on cPanel.
From now on the email will show the correct address.
Also you might want to increase the deliverability of your message and to instruct the email servers that are receiving the email that you're using a legit account, so you should add to their DNS both DKIM and SPF server records.
Note: I suggest you to be extremely cautious when playing around with DNSes, especially when touching email related records. If you are not familiar on how setup new and change the current existing records ask for help from someone who has quite good experience and to guide you through the process so you understand how it works and the consequences of a bad formatted or clashing records.
We recently had a really bad couple of hours at work when someone touched the company records without any clue of what was doing and we ended up with no email and website working for several hours.

Related

How to setup email with AWS Lightsail

I've recently hosted my wordpress website through AWS Lightsail. The site has a contact form and a newsletter, but neither are working. I'm also unable to send a password reset email through wordpress, receiving a message that the host may have disabled the mail() function.
How do I setup email on my website? Is it handled through the domain or the host? I've read that I may need to sign up for AWS SES, however I'm unsure how to proceed. My client has also informed me that they have Outlook 365 setup for the domain, but I'm unsure where that fits in.
Apologies for the vagueness. I'm new to hosting websites online, and have been unable to find any useful tutorials/resources so any help would be greatly appreciated.
I would suggest not hosting your client's email through your Lightsail server. There are a lot of extra headaches to consider and there are other services that are more reliable and offer a better more robust user interface than the options available on server.
To get your client a custom domainname email address (ie joe#domainname.com) here are two options:
Zoho -
Cost: FREE
You can sign up here: https://www.zoho.com/workplace/pricing.html?src=zmail
You need to verify the domain name for this to work (either by adding an HTML file to the site or a CNAME to the domain)
GSuite by Google - Cost: $5/user/month
You can sign up here: https://inbox.google.com/u/0/search/google%20suite#m_-1052842142248281614_
You can also get some good promotional codes to get 20% off the first year - here's one: 9746YLRVNWERPAH
And, to your question about making sure forgot password emails are sent, make sure sendmail is installed on the server (apt-get install sendmail), that the /etc/hosts file contains the following
127.0.0.1 localhost localhost.localdomain yourhostnamehere
and that port 25 is open on the server.

Sending Emails out with From Address from different domain

I work for a subscription fulfillment company, where we handle the subscriptions to various magazines (renewals, invoices primarily). So we email out to the subscribers when they purchase a magazine, that we are charging them for their monthly/annually renewal or they sent us a question about their subscription and we are answering them.
As of right now, we are creating email addresses on our domain for each of our clients (the publishers), but the publishers want us to send out the emails with their domain name as the from (not ours).
I know this can be done because we purchased email blasting software and it does it without a problem (the clients put in SPF records so that it won't be marked as SPAM). The problem is that when our .Net (specifically VB.Net) application goes to send out emails with a From from a different domain, I get back that the user we authenticated to our internal SMTP server with isn't authorized to send out on behalf of the From.
I got a partial idea from Send SMTP with From address of another domain that maybe I could ask the publishers to issue us credentials to their SMTP server and have the .Net code try using their server and credentials to send out the email, but I would prefer not to go that route.
On the same note, our people use Outlook 2010 to answer most of the customer service emails, so it would be good if the solution for the .Net could also work for Outlook. If it doesn't, it doesn't, but at least the .Net one is a step in the right direction.
Now, I am a .Net developer, not an SMTP administrator (but I'm the closest to it that we have). So any instructions need to be detailed, please assume that I am ignorant in this area, so if you say go run program such and such, please state where program such and such is.

How to setup users with email: user#usersdomain.com in ASP.NET

I have a requirement which is to allow users to buy a domain through my site and then programatically set them up with email accounts at that domain, eg user1#domain.com user2#domain.com, etc.
To integrate the buying of the domain I'm planning on using a domain reseller like this.
The next step - of creating the email accounts - is where I'm floundering currently. I'm assuming I can programatically set the domain name to point where ever I need for the email pointers, but not sure how to programatically setup the email client on the other end. I don't care so much what the email client is - gmail, etc. Ideally I'd be able to brand it a bit, but it's not absolutely required.
Hoping someone has experience with this. Thanks in advance.
first you need to choose a mail server for your system. Then you get the SDK of this server and create with the provided interfaces users from your user interface.
For example, a basic free mail server is MailEnable that plesk also use for the same reason.
on this page you can get the sdk of the MailEnable mail server
http://www.mailenable.com/developers.asp
and there you can find the api to control it from your asp.net pages.
Hope this helps you to start.

Drupal contact form sending me duplicate emails

I'm new to Drupal, just made my first site and having some issues with email. Two questions:
I've enabled the site-wide contact form, and sometimes though not always, I'll receive two identical emails from my site when someone submits a message via the contact form.
I've found documentation on Drupal's email handling very sparse. Can someone give me a brief rundown on how Drupal sends email? I have it installed on a godaddy server, and I have my own domain name, but I never set up any email services from godaddy or configured any emails settings for Drupal (e.g. SMTP, POP), so I was surprised it could send emails right off the bat. On this topic, is there a better way to handle simple email tasks like the contact form than by using the built-in email features of Drupal core?
Thanks.
I'm not sure. Can you replicate this
problem yourself or is the just an occasional happening?
By default Drupal will
use the PHP mail() function
(http://php.net/manual/en/function.mail.php)
which (usually) does not require you to do any
explicit email configuration.
You can use the hook_mail_alter (http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_mail_alter/6) in a custom module to peer more deeply into the emails that are being sent. This does require an understanding of PHP.
A very widely used (and better) alternative to the Contact Form is the Webform module (http://drupal.org/project/webform). It provides a very easy to use interface to generate custom forms and does not require any programming knowledge.
If you wish to send more sophisticated emails you may want to investigate the SMTP module (http://drupal.org/project/smtp) which allows you to send to an SMTP server. Also, check into the MimeMail module (http://drupal.org/project/mimemail) as it allows for things like attachments and HTML emails without having to crack open and modify an email's headers via hook_mail_alter.
Answers
Hard to say, it could be a few things, but answering question 2 may give clues about question 1. I am guessing it is due to the configuration of your current email server.
Drupal can be configured to send mail LOTS of different ways, but by default it uses the built in php mail() function. This is configured in your php.ini. I would imagine that godaddy probably set up an SMTP or sendmail server by default.
For both of these issues, I would look at how things are configured (which, due to the nature of godaddy, may not work very well) or by talking to godaddy.
My recommendation would be to use google apps to host your email. Then you can have email sent from your domain but with google reliability, and having it be free!. To connect with drupal, use this module which requires PHPmailer, which may or may not be installed already by godaddy (they should support it though!).
Hope that helps. Leave any more questions in the comments.

Single Sign On on multiple domains

We have two websites with different domain names. One of them is a wordpress site. Both websites have their own authentication system.
For the sake of convenience, it was decided to have a single authentication for both website and making use of session cookies. I searched about it and got to know about Single Sign On. Can anybody tell me how to implement SSO when one of the website is a wordpress site(if this makes any difference)? I would highly appreciate if any help comes.
Pretty simple actually. From the non-wordpress site, you just need to make the login form connect to the wordpress database and check the user-provided credentials. Wordpress uses an md5 password hash, so make sure you hash the users password with the md5() function before passing it to the database. Handle the return results as normal.
One note, make sure that your database user has permissions from the connecting host. If both sites are hosted on the same server (and IP), it won't be an issue regardless. If not, you need to make sure the database user either has permissions from the second IP or from everywhere ('user'#'%').

Resources