Author Topic: Forward incoming email to mailing list  (Read 8175 times)

scottscomp

  • Posts: 18
    • View Profile
Forward incoming email to mailing list
« on: September 20, 2016, 04:20:36 am »
I have some custom software that sends me an alert via email when something important happens (like a server goes down).

I want to be able to automatically redistribute that email to a list of email addresses maintained in ListMail.

There are lots of PHP scripts out there that let you pipe & parse an incoming email directly to a PHP script (to insert the email into a MySQL database, etc.) so this should be theoretically possible.

Has anyone done anything like this?

-Scott


BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Re: Forward incoming email to mailing list
« Reply #1 on: September 27, 2016, 07:08:14 pm »
Hi Scott,

Sure that's possible.  I'm still not sure exactly what you are wanting to do though, can you explain more?  You currently have a list stored in ListMail, and also on another server?  So, when the alert comes from the other server that server is 'down', you want to then start sending the email from ListMail?  Because that's the only way I see that working, you would have to maintain the list in both ListMailPRO, perhaps both are ListMailPRO installations, but either way, you would have to maintain the list on 2 servers, to make sure that is happening properly...

Even then, there are better ways to handle that.  I maintain my lists in several email software applications (and providers) so if a server goes down, I just send from the other email provider, or other software application, instead of trying to maintain a duplicate list in LMP across 2 servers.

One problem with handling it all with LMP, is that LMP is not as accurate in removing bounces correctly, and it's better to maintain the correct list in another software application, such as Sendy (or SparkPost), etc... then duplicate the list(s) back to LMP on another server.

Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

scottscomp

  • Posts: 18
    • View Profile
Re: Forward incoming email to mailing list
« Reply #2 on: September 28, 2016, 08:21:58 am »
Thanks for the reply Brett, unfortunately, I didn't explain the situation well enough.

Basically what I want to do is automatically "forward" an incoming email to a list.

So right now I receive an email alert.  But I want 20 people to get that email alert, not just me.  So I load up those 20 email addresses in Listmail, have the email alert piped to a PHP script, and let the script "forward" that email to that list of 20 people in Listmail. (at least this is my idea...but I'm open to other suggestions)

We wouldn't have to use Listmail for it; we also have an account at constantcontact and they have an API that would work too (but I lack the skills to program it).

And I don't want the email to look like it was forwarded; I want it to look like it came from my email software (like Listmail).  So the PHP script would parse it, just grab the body content and subject line, and then re-send the email to the list using the same subject line and body content.

Any ideas?

-Scott



BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Re: Forward incoming email to mailing list
« Reply #3 on: October 23, 2016, 11:26:32 am »
Scott,

It's easier if you just setup forwarding on the email address directly on the server... however you'll have to remove all those forwards when you're done.  There's a way to write a shell script (Linux/Unix) to do that, instead of trying to write that auto-forward PHP script you speak of.  Writing that auto-forward script is frowned on by most hosting providers, and most do not even allow it any more, or if they do, it's not reliable.

The forwards I speak of can be done from cPanel, just click on Forward, and select the FROM, and enter the TO address, the email does not look like a forward (I don't believe), it's just a straight copy of the original email to the TO address.

I hope that helps... if you wish further assistance, I would be happy to work with you on this, for my standard consulting fees, contact me at the page listed below (in my signature).



Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

scottscomp

  • Posts: 18
    • View Profile
Re: Forward incoming email to mailing list
« Reply #4 on: October 23, 2016, 11:42:20 am »
I understand forwarding in cPanel but the email list needs to get pulled from a mysql database (such as a list in ListMailPro).   We currently have about 75 users that would need to get the emails.  It would be too cumbersome to manage that via cPanel.

I'm not sure why the host wouldn't allow it... it would just use mail() or SMTP like any other mailing script.

I'll try to get an example of one of the alerts and then I'll contact you to see if it's something you can do or not.

-Scott

scottscomp

  • Posts: 18
    • View Profile
Re: Forward incoming email to mailing list
« Reply #5 on: October 28, 2016, 12:40:15 pm »
This topic can be considered closed because our situation has changed.  I figured how to adjust our software so it sends an HTTP request (either GET or POST) instead of an email, so now we can post the data directly to a PHP instead of instead of piping an email to it.

So now I'm going to make a new post in the Integrations section to see if someone can help me figure out how to do the rest of it.  :)

-Scott