Google apps kullanarak web mail / iletişim formunda mail gönderme
mail sunucu olarak google apps kullanıp mail formu çalışmayan
persist yada jmail bileşenleri ile mail göndereme gibi sorunlarla karşılaşan
webmaster arkadaşlar aşağıdaki yöntemle mail gönderebilirler.
Kırmızı alanları kendi formunuza uyarlayarak kullanabilirsiniz.
AdSoyad = Request.Form("adi")
Firma = Request.Form("firma")
Telefon = Request.Form("telefon")
Mesaj = Request.Form("mesaj")
eposta = Request.Form("eposta")
msgBody = "<br>Ad_Soyad : " & AdSoyad & vbcrlf & _
"<br>Firma : " & Firma & vbcrlf & _
"<br>Telefon : " & Telefon & vbcrlf & _
"<br>eposta : " & eposta & vbcrlf & _
"<br>Mesaj : " & Mesaj & vbcrlf
Set myMail = CreateObject("CDO.Message")
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.gmail.com"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true 'Use SSL for the connection
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text)
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="info@domaininiz.com" ' change
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="*********" ' change
myMail.Configuration.Fields.Update
Subject = request.Form("Subject")
body = request.Form("msgBody")
email = request.Form("info@domaininiz.com")
myMail.To = "mail-gidecek@domaininiz.com"
myMail.Subject = "Merhaba | Yeni bir mesajın var."
myMail.From = ""&eposta&""
myMail.HTMLBody = ""&msgbody&""
myMail.Send
Set myMail = Nothing
If err Then ' hata mesajyny alalym Mail Gönderilmemi?se..
Response.Write err.Description & "<br>Mesajınız Gönderilmedi.."
End If
Response.Write "<script>alert('mesaj gönderildi');</script>"
end if