Can anyone please help with using the omail dll with my C code. I haven't tried using external dlls before and the help section Extending Origin C via External DLLs implies the need for a header file.
You don't need a header file or OriginC to access objects like that created by the omail.dll. If you need to access from OriginC, then use something like:
void a_test() { LT_execute("dll -a mail omail;"); using mail = LabTalk.mail; mail.SMTP.server$ = "mysmtpserver.com"; mail.SMTP.from$ = "bogus@address.com"; mail.SMTP.to$ = "sample@sample.net"; mail.SMTP.subject$ = "This is some subject"; mail.SMTP.header$ = "C:\Header.txt"; mail.SMTP.text1$ = "This is the message body, line 1"; mail.SMTP.text2$ = "This is the message body, line 2"; mail.SMTP.text3$ = "This is the message body, line 3"; mail.SMTP.text4$ = "This is the message body, line 4"; mail.SMTP.footer$ = "My footer"; mail.SMTP.signature$ = "That's all folks!"; if ( mail.SMTP.send() ) { printf("Sending failed!\n"); } else { printf("Sending successful.\n"); } }