Re: Sending SMTP emails from VFP using PowerShell.

2015-11-21 Thread Sytze de Boer
Hi Koen

I have tried sending emails with the psdemo.prg and still no luck
But, using this prg, I didn't get any errors. Just no emails were sent.




On Sun, Nov 22, 2015 at 12:05 AM, Koen Piller  wrote:

> Hi Sytze,
> I have read multiple answers / contributions to your problem, however
> failed to see which one is now the final answer. In other words, have you
> now solved it and if so which was the advise to show you the correct
> result?
> Regards,
> Koen
>
> 2015-11-14 21:12 GMT+01:00 Sytze de Boer :
>
> > I must have missed something else altogether.
> > When I try this, I get a message Class definition CLSRECIPIENTCOLLECTION
> is
> > not found
> >
> > When I try to go to
> > https://technet.microsoft.com/en-us/library/hh849925(v=wps.630.aspx
> > the page cannot be found
> >
> > I copied the code from into a prg and called it Test.prg
> > I changed the
> > *loPsServer.cServer = "smtp.mandrillapp.com"
> > *loPsServer.cUser = "mymandrillusername"
> > *loPsServer.cPass = "mymandrillpassword"
> > to my own
> > Addressed a test email to myself with DO TEST, and I get above error
> >
> > What am I doing wrong?
> >
> >
> >
> >
> > On Sun, Nov 15, 2015 at 2:32 AM, Laurie Alvey 
> wrote:
> >
> > > I can't get this to work with smtp.mail.yahoo.com. I tried a test
> > message
> > > to myself (trukke...@gmail.com). I get a blue circle for a bit and
> then
> > a
> > > status bar message "File has been deleted." No mail is received. I've
> > > fiddled with ports, SSL and credentials but no success. The current
> way I
> > > send mail from VFP is with CDO which works.
> > >
> > > Laurie
> > >
> > > On 12 November 2015 at 23:06, Ted Roche  wrote:
> > >
> > > > "Embrace, Enhance, Extend, Extinguish"
> > > >
> > > >
> > > >
> > > > On Thu, Nov 12, 2015 at 3:41 PM, M Jarvis 
> wrote:
> > > > > On Thu, Nov 12, 2015 at 8:01 AM, Ted Roche 
> > wrote:
> > > > >
> > > > >> Alan:
> > > > >>
> > > > >> That's great! I've been banging the drum for "SMTP Good, MAPI Bad"
> > for
> > > > >> a long, long time, but not having good/simple tools for handling
> > > > >> SSL.TLS was a big hangup. Now that MS is _finally_ gaining a
> decent
> > > > >> shell with PowerShell, this is a cool tool to add to the arsenal.
> > > > >>
> > > > >>
> > > > > Isn't SMTP a generic standard?
> > > > >
> > > > > We've all seen what M$ does when it starts playing around with
> > generic
> > > > > standards
> > > > >
> > > > > --
> > > > > Matt Jarvis
> > > > > Eugene, Oregon USA
> > > > >
> > > > >
> > > > > --- StripMime Report -- processed MIME parts ---
> > > > > multipart/alternative
> > > > >   text/plain (text body -- kept)
> > > > >   text/html
> > > > > ---
> > > > >
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/CAG1nNy_ES+m7QZFqoX79-XogB9NPfjD4L_qr1VRHkA=suee...@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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-21 Thread Koen Piller
Hi Sytze,
I have read multiple answers / contributions to your problem, however
failed to see which one is now the final answer. In other words, have you
now solved it and if so which was the advise to show you the correct result?
Regards,
Koen

2015-11-14 21:12 GMT+01:00 Sytze de Boer :

> I must have missed something else altogether.
> When I try this, I get a message Class definition CLSRECIPIENTCOLLECTION is
> not found
>
> When I try to go to
> https://technet.microsoft.com/en-us/library/hh849925(v=wps.630.aspx
> the page cannot be found
>
> I copied the code from into a prg and called it Test.prg
> I changed the
> *loPsServer.cServer = "smtp.mandrillapp.com"
> *loPsServer.cUser = "mymandrillusername"
> *loPsServer.cPass = "mymandrillpassword"
> to my own
> Addressed a test email to myself with DO TEST, and I get above error
>
> What am I doing wrong?
>
>
>
>
> On Sun, Nov 15, 2015 at 2:32 AM, Laurie Alvey  wrote:
>
> > I can't get this to work with smtp.mail.yahoo.com. I tried a test
> message
> > to myself (trukke...@gmail.com). I get a blue circle for a bit and then
> a
> > status bar message "File has been deleted." No mail is received. I've
> > fiddled with ports, SSL and credentials but no success. The current way I
> > send mail from VFP is with CDO which works.
> >
> > Laurie
> >
> > On 12 November 2015 at 23:06, Ted Roche  wrote:
> >
> > > "Embrace, Enhance, Extend, Extinguish"
> > >
> > >
> > >
> > > On Thu, Nov 12, 2015 at 3:41 PM, M Jarvis  wrote:
> > > > On Thu, Nov 12, 2015 at 8:01 AM, Ted Roche 
> wrote:
> > > >
> > > >> Alan:
> > > >>
> > > >> That's great! I've been banging the drum for "SMTP Good, MAPI Bad"
> for
> > > >> a long, long time, but not having good/simple tools for handling
> > > >> SSL.TLS was a big hangup. Now that MS is _finally_ gaining a decent
> > > >> shell with PowerShell, this is a cool tool to add to the arsenal.
> > > >>
> > > >>
> > > > Isn't SMTP a generic standard?
> > > >
> > > > We've all seen what M$ does when it starts playing around with
> generic
> > > > standards
> > > >
> > > > --
> > > > Matt Jarvis
> > > > Eugene, Oregon USA
> > > >
> > > >
> > > > --- StripMime Report -- processed MIME parts ---
> > > > multipart/alternative
> > > >   text/plain (text body -- kept)
> > > >   text/html
> > > > ---
> > > >
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/cacuu1ssio1caapdfkvoqohxl1ughn-kfv6bltyu3klt-p0x...@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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-18 Thread Mike Copeland

Thanks Ken, got that.

Mike

Ken Dibble wrote:
And I should have said explicitly (though it is implied), that I do 
this with a Rackspace email account...


Ken


FYI, I tried using it with my SMTP provider (Rackspace) who requires 
SSL and StartTLS. I kept getting an authorization error, login 
credentials were refused.


This doesn't make sense to me. I can use code based on the VFP SMTP 
email class on the Fox Wiki


http://fox.wikis.com/wc.dll?Wiki~SendSmtpEmail#vfpsmtpken

to send email using the AUTH LOGIN protocol. No SSL or TLS required. 
And it uses Port 25.


Something about your configuration may cause RackSpace to *expect* 
those things, but RackSpace, as an email service, does not *require* 
them.


Yes I know, "insecure", "dangerous" (if you're next to one of the 
half dozen or so crazed l33t script kiddies who bother trying to 
intercept and decode email packets; everybody else just uses phishing 
schemes) and so forth. Point is, it works. A bit of research would 
result in the ability to apply a different protocol within the code; 
I just haven't had the need for it.


Ken Dibble
www.stic-cil.org



[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/564c35ac.3090...@ggisoft.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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-18 Thread Mike Copeland

Okay, thanks.

Mike

Ken Dibble wrote:


FYI, I tried using it with my SMTP provider (Rackspace) who requires 
SSL and StartTLS. I kept getting an authorization error, login 
credentials were refused.


This doesn't make sense to me. I can use code based on the VFP SMTP 
email class on the Fox Wiki


http://fox.wikis.com/wc.dll?Wiki~SendSmtpEmail#vfpsmtpken

to send email using the AUTH LOGIN protocol. No SSL or TLS required. 
And it uses Port 25.


Something about your configuration may cause RackSpace to *expect* 
those things, but RackSpace, as an email service, does not *require* 
them.


Yes I know, "insecure", "dangerous" (if you're next to one of the half 
dozen or so crazed l33t script kiddies who bother trying to intercept 
and decode email packets; everybody else just uses phishing schemes) 
and so forth. Point is, it works. A bit of research would result in 
the ability to apply a different protocol within the code; I just 
haven't had the need for it.


Ken Dibble
www.stic-cil.org



[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/564c325b.4010...@ggisoft.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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-17 Thread Ken Dibble
And I should have said explicitly (though it is implied), that I do 
this with a Rackspace email account...


Ken


FYI, I tried using it with my SMTP provider (Rackspace) who 
requires SSL and StartTLS. I kept getting an authorization error, 
login credentials were refused.


This doesn't make sense to me. I can use code based on the VFP SMTP 
email class on the Fox Wiki


http://fox.wikis.com/wc.dll?Wiki~SendSmtpEmail#vfpsmtpken

to send email using the AUTH LOGIN protocol. No SSL or TLS required. 
And it uses Port 25.


Something about your configuration may cause RackSpace to *expect* 
those things, but RackSpace, as an email service, does not *require* them.


Yes I know, "insecure", "dangerous" (if you're next to one of the 
half dozen or so crazed l33t script kiddies who bother trying to 
intercept and decode email packets; everybody else just uses 
phishing schemes) and so forth. Point is, it works. A bit of 
research would result in the ability to apply a different protocol 
within the code; I just haven't had the need for it.


Ken Dibble
www.stic-cil.org



[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/76.41.32484.ADBCB465@cdptpa-oedge01
** 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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-17 Thread Ken Dibble


FYI, I tried using it with my SMTP provider (Rackspace) who requires 
SSL and StartTLS. I kept getting an authorization error, login 
credentials were refused.


This doesn't make sense to me. I can use code based on the VFP SMTP 
email class on the Fox Wiki


http://fox.wikis.com/wc.dll?Wiki~SendSmtpEmail#vfpsmtpken

to send email using the AUTH LOGIN protocol. No SSL or TLS required. 
And it uses Port 25.


Something about your configuration may cause RackSpace to *expect* 
those things, but RackSpace, as an email service, does not *require* them.


Yes I know, "insecure", "dangerous" (if you're next to one of the 
half dozen or so crazed l33t script kiddies who bother trying to 
intercept and decode email packets; everybody else just uses phishing 
schemes) and so forth. Point is, it works. A bit of research would 
result in the ability to apply a different protocol within the code; 
I just haven't had the need for it.


Ken Dibble
www.stic-cil.org


___
Post Messages to: ProFox@leafe.com
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/89.BE.32484.CF4CB465@cdptpa-oedge01
** 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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-16 Thread Mike Copeland

Alan,

Appreciate the code very much. Thanks for sharing it.

FYI, I tried using it with my SMTP provider (Rackspace) who requires SSL 
and StartTLS. I kept getting an authorization error, login credentials 
were refused.


After some Googling, I found a bit of info that I can't confirm as true, 
but it does make sense as to why I can't get authorization to work with 
Rackspace SMTP.


Rather than try to repeat what was explained, I'll just insert it here:
==

Your provider needs to support STARTTLS (explicit SSL), which works 
originally over unencrypted ports like 25 and 587, if you want to use 
the Send-MailMessage or System.Net.Mail classes. From the MSDN 
documentation on these classes 
(athttp://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.enablessl(v=vs.110).aspx 
) 
:


TheSmtpClient 
class 
only supports the SMTP Service Extension for Secure SMTP over Transport 
Layer Security as defined in RFC 3207. In this mode, the SMTP session 
begins on an unencrypted channel, then a STARTTLS command is issued by 
the client to the server to switch to secure communication using SSL. 
See RFC 3207 published by the Internet Engineering Task Force (IETF) for 
more information.


An alternate connection method is where an SSL session is established up 
front before any protocol commands are sent. This connection method is 
sometimes called SMTP/SSL, SMTP over SSL, or SMTPS and by default uses 
port 465. This alternate connection method using SSL is not currently 
supported.

===

Apparently, Rackspace, which requires port 465 for all SMTP 
communications requires implicit SSL, not explicit SSL.


But, again, thanks for the code sample! I understand it works well with 
Gmail.


Mike Copeland


Alan Bourke wrote:

For people having trouble with this, I have pasted the code into a Gist
instead, since I can't be bothered formatting it to fit the Fox Wiki
code tags, learning the markup for that etc. So try re-getting it from
here:

https://gist.github.com/anonymous/77919191364228819b6e

Note that in terms of sending some services are touchy about the 'from'
address. Office 365 online for example won't work unless the 'from'
address exactly matches the SMTP login name.





___
Post Messages to: ProFox@leafe.com
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/564ad6f4.2000...@ggisoft.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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-16 Thread Alan Bourke

For people having trouble with this, I have pasted the code into a Gist
instead, since I can't be bothered formatting it to fit the Fox Wiki
code tags, learning the markup for that etc. So try re-getting it from
here:

https://gist.github.com/anonymous/77919191364228819b6e

Note that in terms of sending some services are touchy about the 'from'
address. Office 365 online for example won't work unless the 'from'
address exactly matches the SMTP login name.


-- 
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm

___
Post Messages to: ProFox@leafe.com
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/1447667866.693856.440855713.51afb...@webmail.messagingengine.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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-14 Thread Sytze de Boer
I must have missed something else altogether.
When I try this, I get a message Class definition CLSRECIPIENTCOLLECTION is
not found

When I try to go to
https://technet.microsoft.com/en-us/library/hh849925(v=wps.630.aspx
the page cannot be found

I copied the code from into a prg and called it Test.prg
I changed the
*loPsServer.cServer = "smtp.mandrillapp.com"
*loPsServer.cUser = "mymandrillusername"
*loPsServer.cPass = "mymandrillpassword"
to my own
Addressed a test email to myself with DO TEST, and I get above error

What am I doing wrong?




On Sun, Nov 15, 2015 at 2:32 AM, Laurie Alvey  wrote:

> I can't get this to work with smtp.mail.yahoo.com. I tried a test message
> to myself (trukke...@gmail.com). I get a blue circle for a bit and then a
> status bar message "File has been deleted." No mail is received. I've
> fiddled with ports, SSL and credentials but no success. The current way I
> send mail from VFP is with CDO which works.
>
> Laurie
>
> On 12 November 2015 at 23:06, Ted Roche  wrote:
>
> > "Embrace, Enhance, Extend, Extinguish"
> >
> >
> >
> > On Thu, Nov 12, 2015 at 3:41 PM, M Jarvis  wrote:
> > > On Thu, Nov 12, 2015 at 8:01 AM, Ted Roche  wrote:
> > >
> > >> Alan:
> > >>
> > >> That's great! I've been banging the drum for "SMTP Good, MAPI Bad" for
> > >> a long, long time, but not having good/simple tools for handling
> > >> SSL.TLS was a big hangup. Now that MS is _finally_ gaining a decent
> > >> shell with PowerShell, this is a cool tool to add to the arsenal.
> > >>
> > >>
> > > Isn't SMTP a generic standard?
> > >
> > > We've all seen what M$ does when it starts playing around with generic
> > > standards
> > >
> > > --
> > > Matt Jarvis
> > > Eugene, Oregon USA
> > >
> > >
> > > --- StripMime Report -- processed MIME parts ---
> > > multipart/alternative
> > >   text/plain (text body -- kept)
> > >   text/html
> > > ---
> > >
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/cag1nny-innrx-kkvzgvuhsynrekeudtqqbsphxbuomypopo...@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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-14 Thread Laurie Alvey
I can't get this to work with smtp.mail.yahoo.com. I tried a test message
to myself (trukke...@gmail.com). I get a blue circle for a bit and then a
status bar message "File has been deleted." No mail is received. I've
fiddled with ports, SSL and credentials but no success. The current way I
send mail from VFP is with CDO which works.

Laurie

On 12 November 2015 at 23:06, Ted Roche  wrote:

> "Embrace, Enhance, Extend, Extinguish"
>
>
>
> On Thu, Nov 12, 2015 at 3:41 PM, M Jarvis  wrote:
> > On Thu, Nov 12, 2015 at 8:01 AM, Ted Roche  wrote:
> >
> >> Alan:
> >>
> >> That's great! I've been banging the drum for "SMTP Good, MAPI Bad" for
> >> a long, long time, but not having good/simple tools for handling
> >> SSL.TLS was a big hangup. Now that MS is _finally_ gaining a decent
> >> shell with PowerShell, this is a cool tool to add to the arsenal.
> >>
> >>
> > Isn't SMTP a generic standard?
> >
> > We've all seen what M$ does when it starts playing around with generic
> > standards
> >
> > --
> > Matt Jarvis
> > Eugene, Oregon USA
> >
> >
> > --- StripMime Report -- processed MIME parts ---
> > multipart/alternative
> >   text/plain (text body -- kept)
> >   text/html
> > ---
> >
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/CAMvTR9f9wrR2+=z4o8supfkcqfy+jww+jtzh7ezcqcgo4dx...@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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-12 Thread Ted Roche
"Embrace, Enhance, Extend, Extinguish"



On Thu, Nov 12, 2015 at 3:41 PM, M Jarvis  wrote:
> On Thu, Nov 12, 2015 at 8:01 AM, Ted Roche  wrote:
>
>> Alan:
>>
>> That's great! I've been banging the drum for "SMTP Good, MAPI Bad" for
>> a long, long time, but not having good/simple tools for handling
>> SSL.TLS was a big hangup. Now that MS is _finally_ gaining a decent
>> shell with PowerShell, this is a cool tool to add to the arsenal.
>>
>>
> Isn't SMTP a generic standard?
>
> We've all seen what M$ does when it starts playing around with generic
> standards
>
> --
> Matt Jarvis
> Eugene, Oregon USA
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/cacw6n4uqt6rui6qo5bwnqqyvzp+hof-0pg9x-pjc_a2ecuq...@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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-12 Thread M Jarvis
On Thu, Nov 12, 2015 at 8:01 AM, Ted Roche  wrote:

> Alan:
>
> That's great! I've been banging the drum for "SMTP Good, MAPI Bad" for
> a long, long time, but not having good/simple tools for handling
> SSL.TLS was a big hangup. Now that MS is _finally_ gaining a decent
> shell with PowerShell, this is a cool tool to add to the arsenal.
>
>
Isn't SMTP a generic standard?

We've all seen what M$ does when it starts playing around with generic
standards

-- 
Matt Jarvis
Eugene, Oregon USA


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

___
Post Messages to: ProFox@leafe.com
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/capt54razgqn8dy6-i0cysqpr59hmgddthf3t2omyfufhuqr...@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.


RE: Sending SMTP emails from VFP using PowerShell.

2015-11-12 Thread Tracy Pearson
Ted Roche wrote on 2015-11-12: 
>  Alan:
>  
>  That's great! I've been banging the drum for "SMTP Good, MAPI Bad" for
>  a long, long time, but not having good/simple tools for handling
>  SSL.TLS was a big hangup. Now that MS is _finally_ gaining a decent
>  shell with PowerShell, this is a cool tool to add to the arsenal.
>  
>  On Thu, Nov 12, 2015 at 5:01 AM, Alan Bourke 
wrote:
>  As part of researching a project I noticed that PowerShell has a cmdlet
>  called Send-MailMessage which can send an SMTP mail.
>  
>  It supports HTML body or plain text, multiple recipients,
>  attachments, priority, failure notification, SSL/TLS and SMTP
>  authentication if needed.
>  

Alan,

I'm curious how it handles servers with SSL certificates that do not match
the server name.
This is very common. The only options I have found with many certificate
verifications is to ignore verifying the certificate chain. Which ends up
ignoring expired or revoked certificates.

Tracy Pearson
PowerChurch Software


___
Post Messages to: ProFox@leafe.com
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/000901d11d65$d29186b0$77b49410$@powerchurch.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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-12 Thread Ted Roche
Alan:

That's great! I've been banging the drum for "SMTP Good, MAPI Bad" for
a long, long time, but not having good/simple tools for handling
SSL.TLS was a big hangup. Now that MS is _finally_ gaining a decent
shell with PowerShell, this is a cool tool to add to the arsenal.

On Thu, Nov 12, 2015 at 5:01 AM, Alan Bourke  wrote:
> As part of researching a project I noticed that PowerShell has a cmdlet
> called Send-MailMessage which can send an SMTP mail.
>
> It supports HTML body or plain text, multiple recipients,
> attachments, priority, failure notification, SSL/TLS and SMTP
> authentication if needed.
>
> (I suspect it is using the .Net System.Net.Mail.SmtpClient namespace
> internally)
>
> I have knocked up a quick class to demonstrate how to use it to send
> SMTP email on the VFP Wiki:
> http://fox.wikis.com/wc.dll?Wiki~SendSmtpEmailWithPowershell
>
> Broadly speaking the class wraps functionality that will generate a
> PowerShell script file (.PS1) and then run that using Windows
> Scripting Host.
>
> One drawback is that it doesn't support inline images. So to include an
> image in a HTML body you need to use an image tag with a resolvable URL
> to the image, meaning resolvable by the recipient so either in a public
> location on your own server, or on a third-party content server.
>
> The way round that is inline images, where you add an inline image and
> then just refer to it with a ContentID in the  tag, i.e.:
>
> 
>
> The comments in the PRG refer to an enhanced version of the Send-
> EmailMessage cmdlet that *does* support inline images, so go for that if
> you need to.
>
> You could look on this as analogous to using Blat from VFP, except
> without the faff involved in using Stunnel to overcome Blat's lack of
> SSL/TLS support. That support is vital for for sending via Exchange
> Online, Gmail and so on.
>
> The PRG requires at least PowerShell 3.0, which will be already present
> on anything running Windows 7 SP1 onward, or Windows Server 2008 SP1/
> Windows Server 2008 R2 onward on the server side. So forget about it on
> XP or Vista.
>
>
>
>
> --
>   Alan Bourke
>   alanpbourke (at) fastmail (dot) fm
>
>
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/cacw6n4u2wentmeir2vm74ropcdn93mjxw+y9cxvlrmn3vtx...@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.


RE: Sending SMTP emails from VFP using PowerShell.

2015-11-12 Thread Kurt Wendt
Hey Alan, 

This looks VERY Interesting what you did. Since Stephen has prodded me in the 
recent past to dabble in PowerShell - I kind of knew that he would add his 2 
cents to this topic - and I'm glad he did.

This also sounds like something you should Definitely get posted to the ProFox 
Archives/Downloads section!

-K-

-Original Message-
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Alan Bourke
Sent: Thursday, November 12, 2015 5:01 AM
To: profoxt...@leafe.com
Subject: Sending SMTP emails from VFP using PowerShell.

As part of researching a project I noticed that PowerShell has a cmdlet called 
Send-MailMessage which can send an SMTP mail.

It supports HTML body or plain text, multiple recipients, attachments, 
priority, failure notification, SSL/TLS and SMTP authentication if needed.

(I suspect it is using the .Net System.Net.Mail.SmtpClient namespace
internally)

I have knocked up a quick class to demonstrate how to use it to send SMTP email 
on the VFP Wiki:
http://fox.wikis.com/wc.dll?Wiki~SendSmtpEmailWithPowershell

Broadly speaking the class wraps functionality that will generate a PowerShell 
script file (.PS1) and then run that using Windows Scripting Host.

One drawback is that it doesn't support inline images. So to include an image 
in a HTML body you need to use an image tag with a resolvable URL to the image, 
meaning resolvable by the recipient so either in a public location on your own 
server, or on a third-party content server.

The way round that is inline images, where you add an inline image and then 
just refer to it with a ContentID in the  tag, i.e.:



The comments in the PRG refer to an enhanced version of the Send- EmailMessage 
cmdlet that *does* support inline images, so go for that if you need to.

You could look on this as analogous to using Blat from VFP, except without the 
faff involved in using Stunnel to overcome Blat's lack of SSL/TLS support. That 
support is vital for for sending via Exchange Online, Gmail and so on.

The PRG requires at least PowerShell 3.0, which will be already present on 
anything running Windows 7 SP1 onward, or Windows Server 2008 SP1/ Windows 
Server 2008 R2 onward on the server side. So forget about it on XP or Vista.




--
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm
 
 


--- StripMime Report -- processed MIME parts --- multipart/alternative
  text/plain (text body -- kept)
  text/html
---

[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/80838f1ca795b14ea1af48659f35166f259...@drexch02.corp.globetax.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.


Re: Sending SMTP emails from VFP using PowerShell.

2015-11-12 Thread Stephen Russell
powershell is command line .NET scripting.

Good call to use it this way and skip Blatt.

On Thu, Nov 12, 2015 at 4:01 AM, Alan Bourke 
wrote:

> As part of researching a project I noticed that PowerShell has a cmdlet
> called Send-MailMessage which can send an SMTP mail.
>
> It supports HTML body or plain text, multiple recipients,
> attachments, priority, failure notification, SSL/TLS and SMTP
> authentication if needed.
>
> (I suspect it is using the .Net System.Net.Mail.SmtpClient namespace
> internally)
>
> I have knocked up a quick class to demonstrate how to use it to send
> SMTP email on the VFP Wiki:
> http://fox.wikis.com/wc.dll?Wiki~SendSmtpEmailWithPowershell
>
> Broadly speaking the class wraps functionality that will generate a
> PowerShell script file (.PS1) and then run that using Windows
> Scripting Host.
>
> One drawback is that it doesn't support inline images. So to include an
> image in a HTML body you need to use an image tag with a resolvable URL
> to the image, meaning resolvable by the recipient so either in a public
> location on your own server, or on a third-party content server.
>
> The way round that is inline images, where you add an inline image and
> then just refer to it with a ContentID in the  tag, i.e.:
>
> 
>
> The comments in the PRG refer to an enhanced version of the Send-
> EmailMessage cmdlet that *does* support inline images, so go for that if
> you need to.
>
> You could look on this as analogous to using Blat from VFP, except
> without the faff involved in using Stunnel to overcome Blat's lack of
> SSL/TLS support. That support is vital for for sending via Exchange
> Online, Gmail and so on.
>
> The PRG requires at least PowerShell 3.0, which will be already present
> on anything running Windows 7 SP1 onward, or Windows Server 2008 SP1/
> Windows Server 2008 R2 onward on the server side. So forget about it on
> XP or Vista.
>
>
>
>
> --
>   Alan Bourke
>   alanpbourke (at) fastmail (dot) fm
>
>
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
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/cajidmykasl1jbprclbsr3fqcpwhnkjtj+24gag6v9sf3xil...@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.