Principale utente con più risposte
Invio di allegati via SMTP corrotti

Domanda
-
Risposte
-
prova a mettere un corpo al messaggio. Dalle ricerche che ho fatto potrebbe essere quello il motivo.
If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful. Regards Simon Disclaimer: This posting is provided AS IS with no warranties or guarantees, and confers no rights.
- Contrassegnato come risposta Gianluca Corso martedì 17 aprile 2018 16:01
Tutte le risposte
-
Ciao Gianluca
Riesci a postare il codice VBA relativo all'SMTP?
Simon
If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful. Regards Simon Disclaimer: This posting is provided AS IS with no warranties or guarantees, and confers no rights.
- Modificato Simon.Rech martedì 17 aprile 2018 10:12
-
Public Sub SendEmail()
Dim imsg As Object
Dim iconf As Object
Dim flds As Object
Dim schema As String
Set imsg = CreateObject("CDO.Message")
Set iconf = CreateObject("CDO.Configuration")
Set flds = iconf.Fields
' send one copy with SMTP server (with autentication)
schema = "http://schemas.microsoft.com/cdo/configuration/"
flds.Item(schema & "sendusing") = cdoSendUsingPort
flds.Item(schema & "smtpserver") = "mySmtpserver"
flds.Item(schema & "smtpserverport") = 25
flds.Item(schema & "smtpauthenticate") = cdoBasic
flds.Item(schema & "sendusername") = "myusername"
flds.Item(schema & "sendpassword") = "mypassword"
flds.Item(schema & "smtpusessl") = False
flds.Update
With imsg
.To = "xxxxx@xxxxx.com"
.From = "yyyyyy@yyyyy.it"
.Subject = "Test Send"
.HTMLBody = "Test"
.addAttachment "C:\PDF\xxxx.pdf"
'.Sender = "Sender"
'.Organization = "My Company"
'.ReplyTo = "address@mycompany.com"
Set .Configuration = iconf
.Send
End With
Set iconf = Nothing
Set imsg = Nothing
Set flds = Nothing
End Sub
-
Al posto di .HTMLBody prova a mettere .TextBody
Simon
If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful. Regards Simon Disclaimer: This posting is provided AS IS with no warranties or guarantees, and confers no rights.
-
-
prova a mettere un corpo al messaggio. Dalle ricerche che ho fatto potrebbe essere quello il motivo.
If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful. Regards Simon Disclaimer: This posting is provided AS IS with no warranties or guarantees, and confers no rights.
- Contrassegnato come risposta Gianluca Corso martedì 17 aprile 2018 16:01
-