[SalesForce] Trigger Welcome Email after adding new subscriber via API

I have a web form that adds subscribers to a list via the API but because i'm using the API rather than web collect it won't send out the welcome email. How would I send send the welcome email via api? I've found examples on how to create a new Trigger email and add a list to it as well as how to trigger it but I want to send one email to one specific email(the new sub that was just added).

The workflow of my code is like this;

enter email in form-> submit form -> PHP script adds email to list-> success

I would like it to do this

enter email in form-> submit form -> PHP script adds email to list-> success -> send welcome email to new sub.

Is there a simple way to do this?

Best Answer

I would set up a new Triggered Send definition in the account and then call it manually using either the SOAP or REST API's. Populate the Triggered Send request with the info of the new subscriber you just successfully added. There are a couple ways to do this with ET's APIs.

SOAP http://help.exacttarget.com/en-US/technical_library/web_service_guide/technical_articles/send_triggeredsend_email/

REST https://code.exacttarget.com/api/messaging-messagedefinitionsends-send

Fuel SDK You can also send a triggered email in PHP with the FuelSDK. The Fuel SDK is an abstraction layer on top of the API's listed above. https://code.exacttarget.com/sdks/fuel-sdk-interacting-triggeredsend