Send email: Difference between revisions

+Fortran (using COM)
(+Fortran (using COM))
Line 404:
}
</lang>
 
=={{header|Fortran}}==
===Intel Fortran on Windows===
Using Outlook COM server. Before compiling the program, it's necessary to use the ''Intel Fortran Module Wizard'' from the Visual Studio editor, to generate a Fortran module for the Microsoft Outlook Object Library. The following program has to be linked with this module.
 
<lang fortran>program sendmail
use ifcom
use msoutl
implicit none
integer(4) :: app, status, msg
call cominitialize(status)
call comcreateobject("Outlook.Application", app, status)
msg = $Application_CreateItem(app, olMailItem, status)
call $MailItem_SetTo(msg, "somebody@somewhere", status)
call $MailItem_SetSubject(msg, "Title", status)
call $MailItem_SetBody(msg, "Hello", status)
call $MailItem_Send(msg, status)
call $Application_Quit(app, status)
call comuninitialize()
end program</lang>
 
=={{header|Go}}==
Anonymous user