Hi again,
I'm using BLAT.DLL for send e.mail from within a program, but it is'nt "Pure" construct, and some options do not work fine ("-charset" by example).
All options, from BLAT help:
Code:
;===========================================================================
;-USAGE
;===========================================================================
;
; syntax:
; Blat <filename> -To <recipient> [optional switches (see below)]
; Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]] [-q]
; Blat -profile [-delete | "<default>"] [profile1] [profileN] [-q]
; Blat -h [-q]
;
; -install <server addr> <sender's addr> [<try n times> [<port> [<profile>]]]
; : set's SMTP server, sender, number of tries and port for profile
; (<try n times> And <port> may be replaced by '-').
;
; <filename> : file with the message body ('-' For console input, End with ^Z)
; -To <recipient> : recipient list (also -t) (comma separated)
; -tf <recipient> : recipient list filename
; -subject <subj>: subject Line (also -s)
; -f <sender> : overrides the Default sender address (must be known To server)
; -i <addr> : a 'From:' address, not necessarily known To the SMTP server.
; -cc <recipient>: carbon copy recipient list (also -c) (comma separated)
; -cf <file> : cc recipient list filename
; -bcc <recipient>: blind carbon copy recipient list (also -bcc) (comma separated)
; -bf <file> : bcc recipient list filename
; -organization <organization>: Organization field (also -o And -org)
; -body <text> : Message body
; -x <X-Header: detail>: Custom 'X-' header. eg: -x "X-INFO: Blat is Great!"
; -r : Request Return receipt.
; -d : Request disposition notification.
; -h : displays this help.
; -q : supresses *all* output.
; -Debug : Echoes server communications To screen (disables '-q').
; -noh : prevent X-Mailer header from showing homepage of blat
; -noh2 : prevent X-Mailer header entirely
; -p <profile> : send with SMTP server, user And port defined in <profile>.
; -priority <pr> : set message priority 0 For low, 1 For high.
; -server <addr> : Specify SMTP server To be used. (optionally, addr:port)
; -port <port> : port To be used on the server, defaults To SMTP (25)
; -hostname <hst>: Select the hostname used To send the message
; -mime : MIME Quoted-Printable Content-Transfer-Encoding.
; -enriched : Send an enriched text message (Content-Type=text/enriched)
; -html : Send an HTML message (Content-Type=text/html)
; -uuencode : Send (binary) file UUEncoded
; -base64 : Send (binary) file using base64 (binary Mime)
; -try <n times> : how many time blat should try To send. from '1' To 'INFINITE'
; -attach <file> : attach binary file To message (may be repeated)
; -attacht <file>: attach text file To message (may be repeated)
; -ti <n> : Set timeout To 'n' seconds.
; -u <username> : Username For AUTH LOGIN (use with -pw)
; -pw <password> : Password For AUTH LOGIN (use with -u)
; -log <filename>: Log everything but usage To <filname>
; -plain : Use AUTH PLAIN To login To SMTP server (use with -u -pw)
; -charset <cs> : User defined charset. The Default is ISO-8859-1
;
; Note that If the '-i' option is used, <sender> is included in 'Reply-to:'
; And 'Sender:' fields in the header of the message.
;
; Optionally, the following options can be used instead of the -f And -i
; options:
;
; -mailfrom <addr> The RFC 821 MAIL From: statement
; -from <addr> The RFC 822 From: statement
; -replyto <addr> The RFC 822 Reply-To: statement
; -returnpath <addr> The RFC 822 Return-Path: statement
; -sender <addr> The RFC 822 Sender: statement
;
; For backward consistency, the -f And -i options have precedence over these
; RFC 822 defined options. If both -f And -i options are omitted then the
; RFC 821 MAIL FROM statement will be defaulted To use the installation-defined
; Default sender address
;
; EXAMPLES:
;
; Blat -install smtphost.bar.com foo@bar.com // Sets host And userid
; Blat -install smtphost.bar.com foo // Sets host And userid
; Blat -install smtphost.bar.com // Sets host only
;
; Blat myfile.txt -subject "A file for pedro" -To foo@bar.com
; // Sends a file with subject line "A file for pedro"
;
; Blat myfile.txt -subject "A file for pedro" -To foo@bar.com -q
; // Sends a file with subject line "A file for pedro" And does not print
; // informative messages on the console
;
; Blat myfile.txt -subject "A file for mark" -To fee@fi.com -f foo@bar.com
; // -f option overrides the Default sender
;
; Blat myfile.txt -subject "A file for pedro" -To foo@bar.com -i "devil@fire.hell"
; // -i replaces "From:" line address (but leaves Reply-To: And Sender: lines)
;
; Blat myfile.txt -subject "animals" -To fee@fi.com -cc "moo@grass.edu,horse@meadow.hill"
; // -c mails carbon copies To users moo@grass.edu And horse@meadow.hill
;
; Blat.exe BLAT.ZIP -subject "file to gil" -To foo@bar.com -base64
; // Sends the binary file BLAT.ZIP To Gilles in MIME Base 64 format
;
; Blat.exe BLAT.ZIP -subject "file to gil" -To foo@bar.com -uuencode
; // Sends the binary file BLAT.ZIP To Gilles in the old UUEncode format
;
; Blat myfile.txt -subject "oumpla" -To foo@bar.com -attach c:\myfolder\*.txt
; // Sends a file with subject line "oumpla", attach all files with extension "TXT"
; // in folder "myfolder" on drive "C:". Note: you must specify a filename/pattern,
; // "-attach .\*.*" will send all files in current folder.
; // "-attach ." will not send anything And WILL NOT GIVE YOU ANY WARNING.
;
; Blat myfile.txt -To fee@fi.com -server smtp.domain.com -port 6000
; // sends the message through SMTP server smtp.domain.com at port 6000
;
; Blat myfile.txt -To fee@fi.com -hostname friend
; // tells the SMTP that this computer is called "friend"
;
; The DLL works in exactly the same way as Blat.exe !