This page provides information on use of utility Command line email in Microsoft Access VBA macro (Visual Basic for Applications). With knowledge of VBA you can send automatic, well formatted HTML emails directly from Microsoft Access macro. By using Febooti Command line email you can:
Example for MS Access VB script:
' Send Access e-mail and output the result.
' 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 firstname.lastname@example.org "
command = command & "-TO email@example.com "
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
' Use proc.ExitCode to check for returned %errorlevel%
s = s & "StdOut=" & proc.StdOut.ReadAll()
s = s & Chr(13) & Chr(10) & "ExitCode=" & proc.ExitCode
Set wsShell = Nothing
Set proc = Nothing
' Error Level values and descriptions are available at:
Please do not hesitate to contact our support department with any possible further questions or to solve practical issues connected with Command line email.