Where should I write the Email Code ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aquils
    New Member
    • Nov 2009
    • 4

    Where should I write the Email Code ?

    I have a program which has 4 layers, the PL, Webservice, BL and DL. I have a form which sents an email, any suggestions where should I write the code for sending emails.
    Thanks
  • PRR
    Recognized Expert Contributor
    • Dec 2007
    • 750

    #2
    Have a dedicated application which sends emails from either a Database or XMl file and update "sentMails" status for that particular mail. Let your form gather all information required for sending mails, like message, sender & receiver mail, sttachments etc . Do the required validation using regular expression and required field validators. Then on "submit" store the information in Database or XML file with "sentMail" status as False. Your mail sending program then periodically "scans" for mails to be sent and send them. If mails are successfully sent then updates the status.
    SmtpClient class

    Comment

    Working...