Arkadaşlar sitede smtp ile outlok olmadan hotmail hesabı ile mail gönderimlerini inceledim ancak benim istediğim olmadı. örnek dosyamda form sayfasında MAİL GÖNDER butonuna bastığımda raporunu pdf ile smtp outlok olmadan göndermek istiyorum. ancak yapamadım yardımcı olabilirmisiniz.
MAİL GÖNDER butonun içine şu kodlar vardır sitedeki örnek dosyalardan kopyaladım. bu kodlarla uyarlanabilirmi
Visual Basic Code
PrivateSub GONDER_Click()DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "calisan", Application.CurrentProject.Path & "\DETAY.XLS"
' + mail gönderme işlemi
Dim iMsg, iConf, Flds, schema
Set iMsg = CreateObject("CDO.Message")Set iConf = CreateObject("CDO.Configuration")Set Flds = iConf.Fields
schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema & "sendusing")=2
Flds.Item(schema & "smtpserver")= "smtp.gmail.com"
Flds.Item(schema & "smtpserverport")=465
Flds.Item(schema & "smtpauthenticate")=1
Flds.Item(schema & "sendusername")= "gmailadresim"
Flds.Item(schema & "sendpassword")= "gmailşifrem"
Flds.Item(schema & "smtpusessl")=1
Flds.Update
With iMsg
.To= "gid@ecekkişimailad.resi"
.From = "gön@deren.kişi"
.Subject = "konuumuz excelle gönderinimi"
.HTMLBody = "evettt gönderdik gitti aldınızsa bana cepten ulaşın"
.Sender = "ben"
.Organization = "yineben"
.ReplyTo = "yanlışkişiyegitti ise geri gelecek adres"
.AddAttachment Application.CurrentProject.Path & "\DETAY.XLS" 'burda stfile adlı globale atadığımız rapor dosyasının yeri adı"
Set .Configuration = iConf
OnErrorGoTo10:
.Send
EndWith10:
MsgBox "Kullanılabilir değil, bilgilerinizi kontrol edin."
Set iMsg =NothingSet iConf =NothingSet Flds =NothingEndSub
bir önceki yazmış olduğum soru için dönüş cevabımı yaptım. bu site harika hem takip hemde verilen cevaplar yerinde ve zamanında bu konuya hakim hocalarımdanda yardımlarını bekliyorum. herşey için teşekkür ederim.
PrivateSub GONDER_Click()DoCmd.OutputTo acOutputReport, "calisan", "PDFFormat(*.pdf)", CurrentProject.Path & "\DETAY.pdf",False,"",, acExportQualityPrint
' + mail gönderme işlemi
Dim iMsg, iConf, Flds, schema
Set iMsg = CreateObject("CDO.Message")Set iConf = CreateObject("CDO.Configuration")Set Flds = iConf.Fields
schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema & "sendusing")=2
Flds.Item(schema & "smtpserver")= "smtp.gmail.com"
Flds.Item(schema & "smtpserverport")=465
Flds.Item(schema & "smtpauthenticate")=1
Flds.Item(schema & "sendusername")= "xxxxxxxxxx@gmail.com"
Flds.Item(schema & "sendpassword")= "gmailsifre"
Flds.Item(schema & "smtpusessl")=1
Flds.Update
With iMsg
.To= "kime"
.From = "kimden"
.Subject = "pdf gönder"
.HTMLBody = "evettt gönderdik gitti aldınızsa bana cepten ulaşın"
.Sender = "ben"
.Organization = "yineben"
.ReplyTo = "yanlışkişiyegitti ise geri gelecek adres"
.AddAttachment Application.CurrentProject.Path & "\DETAY.pdf" 'burda stfile adlı globale atadığımız rapor dosyasının yeri adı"
Set .Configuration = iConf
.Send
EndWithSet iMsg =NothingSet iConf =NothingSet Flds =Nothing
Kill (CurrentProject.Path & "\DETAY.pdf")EndSub
"Boş Örnek Eklerim, Yapıp Verirler" demeyin, örneğinizi hazırlayın. Komplike kod talebiniz var ise İletişim bağlantısından bize ulaşın. Cebelleşmezsen Öğrenemezsin.