0

I have viewed the following two answers although I was wondering if it would be possible to change the name and email (Something that has been shown on existing answers) to use an email that is under a different domain. I am not sure how to sort out the different domain side of the problem

How to change sender email based on product id in WooCommerce

Change sender name and email address for specific WooCommerce email notifications

Any help would be much appreciated!

  • You can specify any sender you like in an email message you send. The question is if the SMTP servers will accept that message. That obviously depends on their setup. No (sane) SMTP server will just accept _any_ such message, they typically only accept non relay messages or messages sent from accounts (domains) they are responsible for according to their configuration. – arkascha Oct 22 '22 at 07:12
  • Hi @arkascha, thank you for your response. Don’t I need to provide the hostname and ports / username and password for the email address as it is using a different domain? Do you know how I can set these via PHP? – George Eden Oct 23 '22 at 15:23
  • As said: that depends on the server and its setup. It is very common that a single server is responsible for various domains. I for example operate my own email service. And I personally use various addresses, different domains (I own), all via that one service. What you describe is something else, sounds like you want to have a local map of accounts, so that you have information about the service and credentials you need to use depending on the chosen sender address. – arkascha Oct 23 '22 at 17:18
  • Hi @arkascha, I am using woocommerce for all of this so I am struggling with defining the hostname and port details (Along with the password). I have tried updating the email for it to use on certain orders but whenever it tries to use the different email I receive the following error: https://pastebin.com/Lh7rqLw1 Of course for woocommerce to be able to use the second email address from another domain I expect to have to provide it with all the email account details, however it doesn't mention how to do this on any of the documentation for woocommerce. – George Eden Oct 23 '22 at 20:23
  • Everything I wrote before applies, the question is if you have a single email service you can use for all sender addresses or not. If not you indeed need to use different credentials. I have no idea whether a specific library or framework allows for that. It probably makes sense to contact their support if you cannot find a hint in their documentation. Or you need to dive into the code to adapt it to your needs. – arkascha Oct 23 '22 at 20:41

0 Answers0