Ver Mensaje Individual
  #14 (permalink)  
Antiguo 09/05/2008, 03:04
Avatar de dogduck
dogduck
 
Fecha de Ingreso: enero-2006
Ubicación: ¿Atlantida, Hesperides, Islas afortunadas?
Mensajes: 2.231
Antigüedad: 19 años, 2 meses
Puntos: 19
Re: ACCESS 2003 - Páginas de acceso a datos -> Envio de correo

Mirate esto a ver si te convence:

http://www.febooti.com/products/comm...ms-access.html

Cita:
<html>
<head></head>
<script language="VBS">
Sub Send_email()
Dim server
Dim subj
Dim body
Dim command

' Define all email parameters.

server = " -SMTP smtp.sender.com -PORT 25"
subj = "email using Access VBA"

body = """This is <I>HTML / MIME</I> e-mail message "
body = body & "sent from MS ACCESS VB script<BR>"
body = body & "using <B>febooti Command line email</B>"""

command = "febootimail.exe -HTML -FROM [email protected] "
command = command & "-TO [email protected] "
command = command & "-SUBJ " & subj & " -BODY " & body & server

' We are passing one long line to Scripting object.
' If you need to add aditional parameters, do it before.

Dim wsShell, proc
Set wsShell = CreateObject("wscript.shell")
Set proc = wsShell.Exec(command)

Dim s : s = ""
Do While proc.Status = 0
' Yields execution so that the operating system can process other events
DoEvents
Loop

' Use proc.ExitCode to check for returned %errorlevel%

s = s & "StdOut=" & proc.StdOut.ReadAll()
s = s & Chr(13) & Chr(10) & "ExitCode=" & proc.ExitCode
MsgBox (s)

Set wsShell = Nothing
Set proc = Nothing

' Error Level values and descriptions are available at:
' http://www.command-line-email.com/on...rrorlevel.html

End Sub
</script>
<body>

<p>&nbsp;</p>
<form method="post">
<input name="Button1" type="button" value="Envia mail" onclick="Send_email()">
</form>

</body>
</html>

salu2