Salve a tutti,
usando l'oggetto CDONTS con il metodo .AttachFile è possibile allegare un file e allo stesso tempo rinominarlo come allegato...
mentre utilizzando CDOSYS non riesco a fare la stessa cosa con il metodo .AddAttachment, esiste un modo per rinominare il file come allegato anche in CDOSYS?
...poi un'altra cosa, non riesco a impostare la priorità del messaggio e il nome del mittente....
codice:
Set ObjSendMail = CreateObject("CDO.Message")
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="out.virgilio.it"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
ObjSendMail.Configuration.Fields.Update
ObjSendMail.From = sFrom
ObjSendMail.Sender = sFromName
ObjSendMail.To = sTo
ObjSendMail.Subject = Subject
If Cint(Format)=0 then
ObjSendMail.HTMLBody = Body
Else
ObjSendMail.TextBody = Body
End if
If countAttachments>0 then
For q=0 to countAttachments-1
ObjSendMail.AddAttachment Attachments(q),FileName(q)
Next
End if
ObjSendMail.Send
Set ObjSendMail = Nothing
spero in vostri consigli.....ciao a tutto il forum