|
-
Jun 10th, 2003, 02:07 PM
#1
Thread Starter
Hyperactive Member
Send SMTP Mail via VB6
We have an SMTP server here at work and I need to be able to send mail thru it.
Anyone have some simple code that works without having to register dll's?
I can't find any examples that 1) work or 2) don't make me register a DLL.
Thanks!!
-
Jun 10th, 2003, 02:15 PM
#2
Let me in ..
If you have Microsoft CDONTS library installed ... you can use this code. This is as simple as you're going to get.
VB Code:
Set objMail = CreateObject("CDONTS.NewMail")
objMail.From = strEmail
objMail.To = strEmailTo
objMail.Subject = strSource
objMail.Body = strContents
objMail.Send
Set objMail = Nothing
-
Jun 10th, 2003, 02:16 PM
#3
Hyperactive Member
Re: Send SMTP Mail via VB6
Originally posted by rockies1
We have an SMTP server here at work and I need to be able to send mail thru it.
Anyone have some simple code that works without having to register dll's?
I can't find any examples that 1) work or 2) don't make me register a DLL.
Thanks!!
You can try this option:
You can use OstroSoft SMTP component. Open file for input, read it into string variable, set SMTP.MessageBody equal to this variable and send it.
Also look into this URL for more info:
http://www.ostrosoft.com/smtp_component.asp
And this as well:
http://www.asp101.com/articles/john/cdosmtprelay/default.asp
Enjoy!!!!
apps_tech
-
Jun 10th, 2003, 02:21 PM
#4
Thread Starter
Hyperactive Member
OstroSoft requires registering a dll...
-
Jun 10th, 2003, 02:26 PM
#5
Hyperactive Member
Originally posted by rockies1
OstroSoft requires registering a dll...
Well then, u might try what techspacey has mentioned. It should work!!!!
Enjoy!!!
apps_tech
-
Jun 10th, 2003, 02:26 PM
#6
Thread Starter
Hyperactive Member
Originally posted by techyspecy
If you have Microsoft CDONTS library installed ... you can use this code. This is as simple as you're going to get.
How do I tell?
I tried setting a reference to Microsoft CDO for NTS 1.2 Library, but I get
Code:
? err.Number
429
? err.Description
ActiveX component can't create object
-
Jun 10th, 2003, 03:03 PM
#7
-
Jun 10th, 2003, 03:06 PM
#8
Thread Starter
Hyperactive Member
I found this and it worked!
http://winsockvb.com/article.php?article_id=20&page=1
Thanks for all the help & pointers!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|