% Sub SendMail(INto, INfrom, Insubject, Inbody) On Error Resume Next Const cdoBasic = 1 'Use basic (clear-text) authentication. Const cdoSendUsingPort = 2 'cdosys related Dim iMsg Dim iConf Dim Flds 'mail related Dim strMsg Dim strTo Dim strCC Dim strFrom Dim strSubject Dim strTextBody '==================begin your configuration============================= 'you must have a username and password or you will not be able to send ' Dim sendusername : sendusername = INsendusername Dim userpassword : userpassword = INuserpassword Dim smtpserver : smtpserver = INsmtpserver 'end your configuration '===================begin set your info here============================ 'set your TO, CC, From, Subject and body here ' strTo = INto strCC = INcc strFrom = INfrom strSubject = Insubject strTextBody = Inbody 'end set your info here 'Create message and configuration objects set iMsg = CreateObject("CDO.Message") set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields 'Apply settings to the configuration object With Flds ' Specify the authentication mechanism to basic (clear-text) authentication. .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic ' The username for authenticating to an SMTP server .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "" ' The password used to authenticate to an SMTP server .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "" ' Port .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort 'Specify mail server .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gdasgroup.com" 'Specify the timeout in seconds .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 ' The port on which the SMTP service specified by the smtpserver field is listening for connections (typically 25) .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Use SSL for the connection (False or True) '.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False .Update End With 'Apply the settings to the message object and send it With iMsg Set .Configuration = iConf .To = strTo .From = strFrom If strCC <> "" Then .CC = strCC End If .Subject = strSubject .phplbody = strTextBody 'Send message .Send End With ' cleanup mail objects Set iMsg = Nothing Set iConf = Nothing Set Flds = Nothing If Err.number = 0 Then mesg="There is an error while sending mail Please try again later." Else mesg="Thanks for showing interest. We will revert to you in short span of time." End If %> <% End Sub if Request.QueryString("posted")<>"" then realname=Request.Form("name") email=Request.Form("email") if Request.Form("Capital")="on" then inter="Capital Market" end if if Request.Form("Commodity")="on" then inter1="Commodity Market" end if tel=Request.Form("tel") address=Request.Form("address") city=Request.Form("city") state=Request.Form("state") brief=Request.Form("Comments") Dim msg msg = msg & "
" msg=msg&" | " msg=msg&" INDIA'S EMINENT ARBITRAGE BROKER " msg=msg&" | |
![]() | "
msg = msg & "||
"
msg=msg &" Name: "&realname&" " msg=msg &" Intersted In: "&inter&" ,"&inter1&" " msg=msg &" Email: "&email&" " msg=msg &" Telephone No: "&tel&" " msg=msg &" Address: "&Address&" " msg=msg &" City: "&city&" " msg=msg &" State: "&state&" " msg=msg &" Requirement: "&brief&" " msg=msg &" Sincerely,"&" " msg=msg &realname&" " msg = msg & " |
|