There's not a direct ASPECT command to send an email, but you can workaround this by using the sendkey and sendkeystr command. Here's a procedure from a script I wrote a while back that illustrates the process. It may be a little more than you need for your case since it also scripts adding an attachment to the mail message, but you can take that code out if necessary.
proc mailforward ;Procedure to email received faxes, requires FaxForward entry in Connection Directory
string sCurrentDialog ;String to hold caption of current dialog/window
string Msg = "Sending New Messages" ;Caption of sending dialog
integer iRC ;Integer to hold result code of strcmp command
dial MAIL "FaxForward" ;Create email message
sendkeystr "Forwarded fax file" ;Set mail subject
sendkey ALT 'M' ;Open Message menu
mspause 250
sendkey 'A' ;Open Add Attachment dialog
sendkeystr sFullZipName ;Attach ZIP file
mspause 250
sendkey ALT 'O' ;Close Add Attachment dialog
mspause 250
sendkey ALT 'M' ;Open Message menu
mspause 250
sendkey 'M' ;Select Send Message menu item
mspause 250
sendkey ALT 'A' ;Open main Message menu
mspause 250
sendkey 'S' ;Select Send and Receive menu item
wintext $ACTIVEWIN sCurrentDialog ;Get caption of current window
strcmp sCurrentDialog Msg iRC ;Compare with known text of sending dialog
while 1 ;Loop while sending dialog is up
yield
wintext $ACTIVEWIN sCurrentDialog
strcmp sCurrentDialog Msg iRC
if (iRC != 0) ;Exit while loop when sending dialog goes away
exitwhile
endif
endwhile
pause 10
if winactivate "Error Window" ;If mail error window is detected
sendkey 0x20 ;Send space to close the window
<DO ANY NECESSARY ITEMS IF MAIL FAILS>
endif
endproc
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.