Send Email Configured Email

Asked

Viewed 26 times

0

I would like to put in my application, sending email. But I would like it to be all configured, that the user could make the settings, before sending the email. For example: put in italics, bold, change the color of the text, and etc. So far I have not located any concrete example on the internet, I know how to send email, but I do not know how to perform this configuration.

  • https://stackoverflow.com/questions/8628683/how-to-send-html-formatted-email

1 answer

0


You already have the function to send the email and in this function there is the correct message field?!

what you need to do is say that email is an html.

mail.IsBodyHtml = true;

Then you need to pass the message to upload already configured with the html tags, getting this way:

<b>Meu nome é Fulano</b>
<br/><br/>
Enviei uma mensagem de teste...

When you send this by its function, the email provider will turn the message tags into style and you will get the desired end result. If you are picking up the text that your user is typing in a textarea for ex, you can use this plugin: https://www.aspsnippets.com/Articles/Rich-Text-Editor-WYSIWYG-Editor-in-ASPNet-MVC-5.aspx it already has the styles and when you pass parameter to its function, the message goes with the tags already implemented.

  • Got it Thiago, I’ll search editors for webforms, and see if I can adapt in my project. The email part is already working. Thank you.

  • Thanks Thiago, I did it based on what helped me and worked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.