Send Email using Classic ASP
-
I used the code below to send mail using asp classic, the code does not work. I am new to ASP dim smtpServer, yourEmail, yourPassword smtpServer = "smtp.gmail.com" yourEmail = "teckchandanirp@gmail.com" 'replace with a valid gmail account yourPassword = "32233223" 'replace with a valid password for account set in yourEmail objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtp.gmail.com objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = teckchandanirp@gmail.com objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = 32233223 objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 objMail.Subject="Application Form Registration Details" objMail.htmlBody = "This is test message" objMail.Send
-
I used the code below to send mail using asp classic, the code does not work. I am new to ASP dim smtpServer, yourEmail, yourPassword smtpServer = "smtp.gmail.com" yourEmail = "teckchandanirp@gmail.com" 'replace with a valid gmail account yourPassword = "32233223" 'replace with a valid password for account set in yourEmail objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtp.gmail.com objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = teckchandanirp@gmail.com objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = 32233223 objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 objMail.Subject="Application Form Registration Details" objMail.htmlBody = "This is test message" objMail.Send