Is there a way that I can have CM only send the welcome email to brand new subscribers and not subscribers that have resubscribed?
Unfortunately there isn't a way to only send the welcome email to brand new subscribers at this stage. The main reason for this is that there can be important information in the welcome email, such as how to unsubscribe.
This is one of those tricky ones where some people will want the welcome email to be sent while others (like yourself) would prefer that it wasn't. We could offer an additional parameter to the api method, but we're always keen to try to keep things as simple as possible.
Are you moving people around lists frequently which is causing this problem? If so, there might be a different way to achieve what you're after.
Thanks for the reply. I have it set up so that, if a person clicks the unsubscribe link they are automatically unsubscribed and then sent to a page where they can give a reason why they unsubscribed or join the list again with edited preferences, see the page here:
I use the subscriber.resubscribeWithCustomFields method to add them back to the list but this sends them the welcome email again that says something to the effect of "thanks for signing up! here's a coupon for 10% off your first purchase"
Ideally, I'd want people who subscribe for the first time to get this but not get it if they already existed on the list.
If I can't determine that through the API, am I be able to write a php script in my welcome email that checks the email vs my database?
If you're comfortable with PHP, you could disable the CM welcome email and have your own "Welcome" page send the welcome email. Not sure how it would check if they were a new or returning subscriber, though; perhaps someone more knowledgeable than myself can tell us if there's a subscriber attribute to check.
If not, one work-around could be to automatically add all unsubscribes to a separate list via your unsubscribe.php page. If they resubscribe, the "Welcome" page could check that list and send them the correct welcome email.
Hope this is helpful.
It works! I went ahead and disabled the welcome email and added the php functionality to the sign up confirmation page. It checks our database to see if the user has ever existed and sends the email only if this is their first time subscribing. Perfect!