Thanks Barry
Will try this later today
SpringBox
Thanks Barry
Will try this later today
SpringBox
Can you also look in the registry and see if this key has something defined to handle MAPI.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem
This is *normally* setup when you have outlook installed which is used as the MAPI provider to send mail.
You should something like this using regedit.
Last edited by barrymavin; 2014-03-23 at 22:39.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Ignore everything i said about MAPI. I now realize you are just using SMTP which is OS independent. My apologies, MAPI is another thing altogether in our code and should not have any affect on this.
You may need to check your firewall and make sure port 25 is open for sending.
Also, please let me see the code that you are using to send the email.
You need to make sure you issue:
mailOpen()
mailSend()
mailclose()
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
You need to make sure that you have indeed enabled SMTP on your email ISP.
If this is google there have been recent changes made which reject emails that are not from trusted domains. These are setup in the SPF records for your email domain.
Details about SPF can be found here.
http://en.wikipedia.org/wiki/Sender_Policy_Framework
It would appear that mailOpen() is not succeeding so when you execute mailsend() it fails saying that you are not logged in.
The easiest way to check that you can indeed login to the email system is by using telnet.
These links will help you troubleshoot it.
http://technet.microsoft.com/en-us/l...exchg.65).aspx
and
http://www.port25.com/how-to-check-a...net-session-2/
Last edited by barrymavin; 2014-03-23 at 23:31.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Hi Barry
The problem NON SSL mailsend() code as follows :
m_open = mailopen(lSMTPServer,lSMTPUser,lSMTPPass,"SMTP")
if not m_open
dialog box mailerror()
return
endif
// send the mail
fromname = "forwarding@xxx.co.uk"
tonames = "sales@xxx.co.uk"
ccnames = ""
subject = "For your information"
msg = "This is a test email"
attachments = ""
m_mailOK = mailsend(fromname, tonames, ccnames, subject, msg, attachments)
wait window 'Mail send status - ' + IIF(m_mailOK = .T., 'Success', 'Failed') timeout 3
if not m_mailOK
messagebox(mailerror())
endif
We cant see any reason why this should not work. Firewalls etc are all open for SMTP send. SMTP is enabled on ISP. Works fine from VFP.
What are we missing? mailopen() returns .T. but mailsend() fails. Will send you the live passwords etc by pm so you can try.
Thanks in advance
SpringBox
Last edited by SpringBox; 2014-03-24 at 15:35.
I have fixed this in the next build. Give it a whirl.
mailOpen() now takes an (optional) last parameter which is the port to use (default is 25).
Note that the username and password for SMTP needs to be base64 so use the base64_encode() function.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
To test SMTP connectivity you can use telnet.
On Windows 7 the telnet client is disabled by default.
To enable it follow the steps detailed here.
http://social.technet.microsoft.com/...et-client.aspx
Details of SMTP commands can be found here.
http://technet.microsoft.com/en-us/m...workssmtp.aspx
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Bookmarks