Q: I used one. Asp web page and have it e-mails to me. How to write a Web page that sends an email? I know the CDONTS object asp works only if I have an SMTP server. But I want the e-mail to a remote SMTP server. Is it possible and how? or any other web language that can do it?
Virtual Private Server (vps) with Web Interface, for MetaTrader Forex
Re:Thanks everybody, especially guy. It works
I got another question, how do I insert a carriage return in my output? For example, in constructing the email body, how would I add carriage return / new line? in .asp
Setting Up A Web Server.
Re:Originally posted by: guy
:confused:
If SMTP server is configured in IIS, you shouldn't have to load the config strings when you call it.
Read here (http://www.devasp.com/Samples/mail.asp)
That's the problem.. he doesn't want SMTP server configured on the web server and I would understand his reason for not wanting to.
Web Design Business Startup Kit
Re::confused:
If SMTP server is configured in IIS, you shouldn't have to load the config strings when you call it.
Read here (http://www.devasp.com/Samples/mail.asp)
Language Intervention eBook
Re:You can also use cdonts to send to an external SMTP server without any 3rd party components.
Sub sendmail()
Const cdoSendUsingMethod="http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort= 2
Const cdoSMTPServer="http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort="http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout ="http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate="http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic=1
Const cdoSendUserName="http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword="http://schemas.microsoft.com/cdo/configuration/sendpassword"
Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields
Dim txtbody
' Get a handle on the config object and it's fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
' Set config fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smtpservername"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "smtpuser"
.Item(cdoSendPassword) = "smtppassword"
.Update
End With
txtbody="Welcome to the Loser's club! I am sure you will meet many more here!"
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "loser@loser.com"
.From = "TheLoser"
.Subject = "Welcome to the Loser's Club!"
.TextBody = txtbody
.Send
End With
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
end sub
It is kinda large, but it is free and built in to 2000 and XP, it will not work with the cdo object in NT4 though, I believe.
Bot
SMTP2Go Worldwide SMTP Email Service for Travelers!
Re:Use JMail. Or if you want spend a few bucks and buy a license of ASPMail.
Language Niche Domination
Re:Originally posted by: guy
I'm not a web developer, but can't ColdFusion do something like that?
Yes, you could do that using <cfmail> tag. But is it worth it to buy ColdFusion server to have sending email capability? Perl and PHP interpreters are readily available for free.
NLP Language Patterns for Advertising
Re:I'm not a web developer, but can't ColdFusion do something like that?
Web Site Promotion.
Re:With Perl and PHP, you could send an email without a local SMTP.
0 Comments.