Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: CDONTS.dll

by c-era (Curate)
on Aug 10, 2001 at 18:23 UTC ( #103879=note: print w/replies, xml ) Need Help??


in reply to CDONTS.dll

This code works for me, running perl 5.6.0 on an exchange server:
use Win32::OLE; $cd = Win32::OLE->new("CDONTS.NewMail") || die $!; $cd->{From}="test\@test.com"; $cd->{To}="test\@test.com"; $cd->{Subject}="test"; $cd->{Body}="test"; $cd->Send; print Win32::OLE->LastError();
if that doesn't work try this in VB and let me know if this works:
Dim cp As Object Set cp = CreateObject("CDONTS.NewMail") With cp .To = "test@test.com" .From = "test@test.com" .Subject = "test" .Body = "test" .Send End With
The above VB code forces VB to use the same OLE interface as Perl does.

Replies are listed 'Best First'.
Re: Re: CDONTS.dll
by TAC (Initiate) on Aug 10, 2001 at 19:25 UTC
    Bizarrely enough the perl snipet you sent me worked. I swear on a stack of Orielly books that I did exactly what you suggested last night and it didn't work. Oh well... However I spoke to our architect and he shunned CDONTS because you don't have control over the headers and footers. He suggested MIME::Lite as an alternative.

    Thanks for your help.
      There actually is a way to get control over the headers and footers, but it's not a pretty hack (plus I don't remember it off hand). Anyways, MIME::Lite is a better choice and is less system and software dependant.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://103879]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2022-01-23 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?