I want to send a picture by email to an email address at "Outlook.com" using MATLAB
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Abdullah
el 5 de Sept. de 2014
Editada: Image Analyst
el 11 de Sept. de 2014
Hi
I want to send a specific picture to an email address using Matlab gui
I know how to browse and select a picture, but I want to send the picture that I selected to send it to any email.
Thanks :)
See attachment.
0 comentarios
Respuesta aceptada
Image Analyst
el 11 de Sept. de 2014
1 comentario
Image Analyst
el 11 de Sept. de 2014
Editada: Image Analyst
el 11 de Sept. de 2014
% NOTE: CHANGE THE NEXT FEW LINES OF CODE WITH TO REFLECT YOUR SETTINGS.
myUserName = 'me';
myPassword = 'thisismypassword';
mySMTP = 'myserver.mydomain.com';
% Assign the sender's email address.
% It can be an actual, real e-mail address,
% but it does not have to be an account that actually exists -
% you can make up one.
sendersEmail = 'me@mydomain.com';
recipientsEMail = 'somebody@Outlook.com';
% Set your email and SMTP server address in MATLAB.
setpref('Internet', 'SMTP_Server', mySMTP)
setpref('Internet', 'E_mail', sendersEmail)
setpref('Internet','SMTP_Username', myUserName);
setpref('Internet','SMTP_Password', myPassword);
props = java.lang.System.getProperties;
props.setProperty('mail.smtp.auth','true');
% Here's where we actually send out the e-mail with the file attached.
sendmail(recipientsEMail, subjectLine, messageBody, attachedFullFileName)
Más respuestas (1)
Ken Atwell
el 6 de Sept. de 2014
You can use sendmail, though you will need to save the image to a temporary file (attachments can only be files).
4 comentarios
Ken Atwell
el 11 de Sept. de 2014
Trying using a function like imwrite to create a image file on disk, then attached it to the email as one of the parameters to sendmail.
Ver también
Categorías
Más información sobre Web Services en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!