sendolmail a cell array?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Does anyone know how to send a variable (cell array) using sendolmail(outlook version of sendmail) or sendmail?
So in the email body, receivers could get
'Security' 'Name' 'Quantity' 'Price'
'F2TEZ3-13' 'Fr Tel div DEC3' [ 2000] [ 0.8800]
'SNDZ2-13' 'NIKKEI DIV DEC12' [ 500] [ 188.3000]
'T2QIZ2-12' 'Tel Itl div DEC2' [ -1000] [ 0.0500]
'R2WEZ2-12' 'RWE div DEC2' [ 150] [ 2.0060]
'FEXDZ3-13' 'ESTX 50 Div DEC3' [ 1412] [ 105.8000]
'FEXDZ2-12' 'ESTX 50 Div DEC2' [ 250] [ 117.8000]
'E2NLZ2-12' 'ENEL div DEC2' [ -1100] [ 0.1500]
'S2SDZ2-12' 'Santand div DEC2' [ 3510] [ 0.5400]
'FEXD1000X3.EX-13' 'OEXD DEC3 100 P' [ 1400] [ 5.8600]
'B2NPZ2-12' 'BNP Par div DEC2' [ -325] [ 1.2000]
Thanks in advance !
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 22 Feb. 2012
You would have to serialize the cell array and send it as an attachment.
Unfortunately the MATLAB serialization routines have no user interface, so you end up having to write your own serialization routines.
Sometimes the easiest thing to do is to save the cell array as a .mat file and attach the .mat file.
2 Kommentare
Weitere Antworten (1)
Jan
am 22 Feb. 2012
sendolmail expects the attachments to be filenames, and not the actual data. So you have to use save at first and supply the name of the created file.
m = {'Security', 'F2TEZ3-13', 'SNDZ2-13', ...
save('m_as_MatFile.mat', 'm');
sendolmail('qzhang', 'Exposure', 'Thanks!', {'m_as_MatFile.mat'})
Siehe auch
Kategorien
Mehr zu Web Services finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!