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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 OMail dll with origin C

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
peter.cook Posted - 06/13/2005 : 07:39:22 AM
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

1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 06/20/2005 : 3:57:20 PM
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");
}
}



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000