Hola buenas,
me gustaría saber si existe algún tutorial o manual para poder enviar un mail con VB. O si no es demasiado complicado, si alguien puede decirme qué necesito tener o configurar para llevarlo a cabo...
Muchas gracias
Un saludo
| |||
Ahí te va una función enterita que lo hace solo. Problema: El programa que debes tener configurado en el PC para poder enviar mails debe ser el Outlook, no vale con el Outlook Express. Sub Send_Mails(PARA As String, TITULO As String, CUERPO As String, Optional ATTACH As Variant, Optional NOMBREATT As Variant, Optional CONC As String) Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem Set appOutLook = CreateObject("Outlook.Application") Set MailOutLook = appOutLook.CreateItem(olMailItem) With MailOutLook .To = PARA .SUBJECT = TITULO .Body = CUERPO If Not IsMissing(CONC) And CONC <> "" Then .CC = CONC If Not IsMissing(ATTACH) Then If ATTACH <> "" Then .Attachments.Add ATTACH, olByValue, 1, NOMBREATT End If End If .Send End With Set MailOutLook = Nothing Set appOutLook = Nothing End Sub
__________________ No te hubieran dado la capacidad de soñar sin darte también la posibilidad de convertir tus sueños en realidad |