Skip to content
Loading
After sending the mail can i save the data in the database
  • Salman Beg
    Hi.
    After sending mail,create one table and insert data in table using entity framework.
    To Know how to insert data using entity fraework you can follow this article,
    https://www.aspsnippets.com/Articles/Insert-data-using-Entity-Framework-in-ASPNet-MVC.aspx
    Thanks. 
  • Malvik Bhavsar
    Dear Debasis Mohapatra,
     
    Yes, you can.
     
    For that creating one table for store email content and sender details. 
    E.g.
    [EmailNotification]
    Id - bigint
    EmailId - varchar(100)
    EmailBody - nvarchar(max) 
    CreatedDate - datetime
    Status - bit   (Store 1 if success else 0 for fail)
    ResponseMessage - nvarchar(500)  (Store response message of email, success or fail in case of error in sending email)
     
    Write logic for insert entry in this table after sending email funcation.