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!!
Printable View
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!!
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
You can try this option:Quote:
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 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
OstroSoft requires registering a dll...
Well then, u might try what techspacey has mentioned. It should work!!!!Quote:
Originally posted by rockies1
OstroSoft requires registering a dll...
Enjoy!!!
apps_tech
How do I tell?Quote:
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.
I tried setting a reference to Microsoft CDO for NTS 1.2 Library, but I getCode:? err.Number
429
? err.Description
ActiveX component can't create object
I believe this should cover your needs.
I found this and it worked!
http://winsockvb.com/article.php?article_id=20&page=1
Thanks for all the help & pointers!!