Skip to main content

AccessTr.neT


SMTP ile Rapor mail gönderme

SMTP ile Rapor mail gönderme

Çözüldü #4
kodu aşağıdaki ile değiştir.

Private Sub 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
End With



Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Kill (CurrentProject.Path & "\DETAY.pdf")

End Sub
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
SMTP ile Rapor mail gönderme - Yazar: SADIK54 - 04/06/2013, 23:18
Cvp: SMTP ile Rapor mail gönderme - Yazar: POWER - 04/06/2013, 23:52
Cvp: SMTP ile Rapor mail gönderme - Yazar: SADIK54 - 05/06/2013, 18:59
Cvp: SMTP ile Rapor mail gönderme - Yazar: ozanakkaya - 05/06/2013, 22:03
Cvp: SMTP ile Rapor mail gönderme - Yazar: SADIK54 - 06/06/2013, 21:16
Cvp: SMTP ile Rapor mail gönderme - Yazar: SADIK54 - 06/06/2013, 21:44
Cvp: SMTP ile Rapor mail gönderme - Yazar: Burak Kara - 25/12/2014, 20:26
Cvp: SMTP ile Rapor mail gönderme - Yazar: atoz112 - 25/12/2014, 20:41
Task