Blat is a great choice to send email via SMTP. However, the mail server
you're trying to reach needs to be able to speak the same set of protocols.
I recall a while ago Google Mail was trouble, as I needed to set up some
sort of certificate to exchange with the server to establish an encrypted
connection. Looking over topics in the Blat Google Group, this doesn't seem
to be the case any more. Google Mail is no doubt the target of Billions of
spam attempts each day, so it's understandable they would make access a
little challenging.

The fact that it works with your credentials but fails with the other set
of credentials is a great clue. I have run into trouble with Blat failing
to properly parse a command line, where a single missing space (or
additional one!) would cause it to fail. You might want to try turning on
the log and seeing what you are sending and the responses you are getting
to see if that provides more ideas. See:
http://www.blat.net/examples/log.html



On Mon, Jul 15, 2013 at 8:42 AM, John Weller <[email protected]> wrote:

> I have been successfully using CDO to send emails from within an app using
> a
> Gmail account I set up for the purpose.  I decided to use Blat instead
> after
> all the comments here about how good it is :-).  If I use my personal email
> account parameters it works fine but as soon as I change it to the Gmail
> parameters (which work with CDO) I get an error message 'File name (message
> text) not given" OR "Bad argument given'
>
> The code section setting out the parameters is:
>
>         *&* Create an object to use to hold the email parameters
>         loParam = CREATEOBJECT('custom')
>
>         *&* Add and populate the properties
>         WITH loParam
>                 *&* From Address
>                 .ADDPROPERTY('cFromAddress', '[email protected]')
>                 *&* To Address - separate addresses with commas
>                 .ADDPROPERTY('cTo', '[email protected]')
>                 *&* CC Address - separate addresses with commas
>                 .ADDPROPERTY('cCC', '')
>                 *&* BCC Address - separate addresses with commas
>                 .ADDPROPERTY('cBCC', '[email protected]')
>                 *&* Subject
>                 .ADDPROPERTY('cSubject', 'Test')
>                 *&* Body
>                 .ADDPROPERTY('cBody', 'test')
>                 *&* HTML format
>                 .AddProperty('lHTMLFormat', .F.) && set to plain text,
> change to .T. to send HTML
>                 *&* SMTP Server
>                 .ADDPROPERTY('cSMTPServer', "smtp.gmail.com")
>                 *&* Port
>                 .AddProperty('nPort', 465)
>                 *&* User name
>                 .AddProperty('cUserName', '[email protected]') && SMTP
> user name
>                 *&* Password
>                 .AddProperty('cPassword', 'mypassword') && SMTP password
>                 *&* Attachments
> *!*                     .ADDPROPERTY('aAttachment[1]', '')
> *!*                     .aAttachment[1] = ThisForm.NewsLoc
>                 *&* Priority
>                 .AddProperty('nPriority', 0)  && 1 = high, 0 =low
>         ENDWITH
>
> I can send and receive from the Gmail account normally.
>
> Any help gratefully received!
>
> TIA
>
> John Weller
> 01380 723235
> 07976 393631
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CACW6n4vKHpy0OCxWJ6-oEoBzJB=78pauggpank2vtbqd9q1...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to