Workflow- Mail triggering at conditional basis
I am having the requirement of trigering the mail automatically at only three occasions (Only updations ) : System should not trigger a mail if there is any modifications in the table.The occassions are as follows:
1.Mail should trigger at the time of creating some entry using the transaction code.
2.Mail should trigger at the time of updation (Line item No.1) in some fields using the same transaction code. ( In this transaction code, both edit and create icons are there. there is no seperate transaction code for edit mode )
3. Mail should trigger at the time of updation (Line item No.2) in some fields using the edit mode of the same above transaction code.
Please suggest me as how we can set the conditions in the program so that system can realise these three occassions. Because the information contains the email will be different in three occassions.Also we have done the worlflow part for triggering the mail automatically upon the saving of the data.
Please throw your ideas,