While sending the images in emails through .net code, we may require to send them as an attachment or they must be embeded there in the body of the email itself.
Below if the code which describes both the ways of sending the images…
a. Embeded b. As attachment.
Namespaces to be included:
We can make all these settings like ‘ToAddress’, ‘FromAddress’ , SMTP host server name using the web.config configurations.
Note: If we need to send the email using our personal domains like gmail, yahoo etc then we need to use password along with the username as shown below: