Visual Basic - ENVIAR UN MAIL SIN QUE EL USUARIO SE DE CUENTA!!!!

Life is soft - evento anual de software empresarial
 
Vista:

ENVIAR UN MAIL SIN QUE EL USUARIO SE DE CUENTA!!!!

Publicado por viri (19 intervenciones) el 18/10/2004 18:59:53
HOLA!!

sOLO QUIERO SABER COMO ENVIAR UN MAIL PERO SIN QUE EL USUARIO SE DE CUENTA, POR EJEMPLO QUE ESTE DANDO CLIC EN UN BOTON PARA ASIGNAR Y EL MAIL SE ENVIE EN AUTOMATICO.

DE ANTEMANO GRACIAS
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

MAPI

Publicado por Hely (126 intervenciones) el 18/10/2004 20:27:46
Eso era muy facil cuando existia y corria el win 95 y 98 y ME.
pero la vaina es con xp el Outlook intercepta el mensaje y dice algo assi:

UN PROGRAMA INTENTA ENVIAR CORREO NO AUTORIZADO DESEA PERMITIRLO ??
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:ENVIAR UN MAIL SIN QUE EL USUARIO SE DE CUENTA!

Publicado por Hely (126 intervenciones) el 18/10/2004 20:29:46
Sub SendMessage(DisplayMsg As Boolean, Optional AttachmentPath)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Nancy Davolio")
objOutlookRecip.Type = olTo

' Add the CC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Michael Suyama")
objOutlookRecip.Type = olCC

Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:final Mapi

Publicado por Hely (126 intervenciones) el 18/10/2004 20:30:36
' Add the BCC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Andrew Fuller")
objOutlookRecip.Type = olBCC

' Set the Subject, Body, and Importance of the message.
.Subject = "This is an Automation test with Microsoft Outlook"
.Body = "This is the body of the message." & vbCrLf & vbCrLf
.Importance = olImportanceHigh 'High importance

' Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add(AttachmentPath)
End If

' Resolve each Recipient's name.
For Each ObjOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next

' Should we display the message before sending?
If DisplayMsg Then
.Display
Else
.Send
End If
End With
Set objOutlook = Nothing
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar