Sending e-mail
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kevin O'Hara
el 21 de Feb. de 2011
Respondida: Adam Jems
el 25 de Sept. de 2018
I am sending an e-mail from MatLab using the following code:
h = actxserver('outlook.application'); mail = h.CreateItem('olMail'); mail.Subject = mTitle; mail.BodyFormat = 'olFormatHTML'; mail.HTMLBody = Text;
Text is string with multiple lines in it. How can I tell Outlook that I need carriage return or two after each line?
0 comentarios
Respuesta aceptada
Jiro Doke
el 21 de Feb. de 2011
I was able to do it by changing the Body property (instead of HTMLBody):
mail.Body = sprintf('This is line one.\nThis is line two.');
0 comentarios
Más respuestas (2)
Walter Roberson
el 21 de Feb. de 2011
HTML is independent of line boundaries, so there might not be a method provided for that. Code <br> or <P> where you need line breaks.
0 comentarios
Adam Jems
el 25 de Sept. de 2018
I also tried this code but I was unable to send email to matlab through my account .i don't know is this due to my firewall or something else .whenever I try to send it shows an error message . for more details regarding this visit - AT&T Email Support
0 comentarios
Ver también
Categorías
Más información sobre Web Services en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!