The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 OMail dll with origin C
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 06/13/2005 :  07:39:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System: Win 2000

Hi,

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.

Thanks.

Cheers,

Pete

greg

USA
1379 Posts

Posted - 06/20/2005 :  3:57:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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");
}
}


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000