ENVIAR CORREO CON WINDOWS LIVE MAIL
Publicado por Hugo (2 intervenciones) el 16/02/2011 15:41:39
Tengo una aplicación que envía archivos pdf por correo... pero al cambiar el outlook por el wlmail deja de funcionar. Necesito modificar algo del código??? Desde ya muchas gracias.Saludos.
mfd.FileType = mailAttach!
mfd.Filename = 'Comprobante.pdf'
mfd.Pathname = 'C:\Comprobante.pdf'
// Creo la sesión de mail y me logueo
mSes = create mailSession
mRet = mSes.mailLogon(mailNewSession!)
if mRet <> mailReturnSuccess! then
MessageBox("Mail", 'No se pudo iniciar sesion con su cliente de correo electronico.')
return -1
end if
// Creo el encabezado:
mMsg.Subject = 'Comprobante'
mMsg.NoteText = 'Se adjunta copia del comprobante.'
mMsg.Recipient[1].name = ls_direccion
mMsg.AttachmentFile[1] = mfd
// Envío
mRet = mSes.mailSend(mMsg)
if mRet <> mailReturnSuccess! then
MessageBox("Mail Send", 'No se pudo enviar el e-mail, verifique la dirección comercial del destinatario.')
return -1
end if
mSes.mailLogoff()
destroy mSes
mfd.FileType = mailAttach!
mfd.Filename = 'Comprobante.pdf'
mfd.Pathname = 'C:\Comprobante.pdf'
// Creo la sesión de mail y me logueo
mSes = create mailSession
mRet = mSes.mailLogon(mailNewSession!)
if mRet <> mailReturnSuccess! then
MessageBox("Mail", 'No se pudo iniciar sesion con su cliente de correo electronico.')
return -1
end if
// Creo el encabezado:
mMsg.Subject = 'Comprobante'
mMsg.NoteText = 'Se adjunta copia del comprobante.'
mMsg.Recipient[1].name = ls_direccion
mMsg.AttachmentFile[1] = mfd
// Envío
mRet = mSes.mailSend(mMsg)
if mRet <> mailReturnSuccess! then
MessageBox("Mail Send", 'No se pudo enviar el e-mail, verifique la dirección comercial del destinatario.')
return -1
end if
mSes.mailLogoff()
destroy mSes
Valora esta pregunta
0