ofxMailUtils - problem sending email

Hi all …

i’m trying to send an email using the ofxMailUtils example provided by arturo but i’m having a little trouble to succeed.

The project compiles and runs with just some warnings … a window with grey background shows up with fps counting on the top left corner.

All the parameters (server, port, email address, etc) seem correctly filled yet nothing happens.

This message is printed to the console after compiling and running:


Running

OF: OF_LOG_ERROR: cannot connect to the server
thread started
thread started
testApp::keyPressed: new message sent
OF: OF_LOG_ERROR: cannot send, not connected to the smtp server
ofThread: thread stopped
ofThread: thread already stopped


is there any chance that the connection to the server (gmail in this case) isn’t being established because of the mandatory use of SSL or TLS in SMTP connections!? if so, how do i work around this?

If someone can walk me through the process of using ofxMailUtils example to send an email, that would be great.

note: using Xcode 3.2.6 on a Mac OSX 10.6.8.

Thanks in advance.

yes, ofxMailUtils doesn’t support ssl, you’ll need to include the poco ssl libraries and modify the addon in order to use ssl or use an account which allows unencripted connections

moltes graciès arturo!

i’ll try to work around this. Hopefully i’ll succeed.

If anyone has already done this … now it’s a good time to let me know and share. :slight_smile:

this could probably use a more meaningful error message, for example here

  
ofLog(OF_LOG_ERROR,"cannot connect to the server: " + e.displayText());  

  
std::string displayText() const   

returns a string consisting of the message name and the message text, according to the Poco-spec.

Any luck?

I am also having problems with using ofxMailUtils because I cant log into my smtp server :confused:

i haven’t got any luck mainly cause i dropped aside this issue. (still haven’t got the skills nor the time to go around this at the moment) =/

if someone has any idea on how to work around this i’m still interested in knowing about it also.

Cheers

ok i know this is a little old but im trying to get my head around this.

I am trying to send an email using my hotmail account. i have entered everything in correctly but am having troubles with the smtp server.

I looked up the SMTP port and server and have edited the following lines of code in ofxMailUtils.h

  
#define OFX_SMTP_HOST "smtp.live.com"  
#define OFX_SMTP_PORT 587  

this should be all i need to do yes to get the smtp to connect? when i run the program it crashes printing a SIGABRT once a key has been pressed. Arturo, do you have any advice or is this just too hard for most average oF users to get their head around?

Thanks.

Hej joshuabatty …

It is never to late to try to solve problems. :slight_smile:

The issue with sending mail using ofxMailUtils addon isn’t related directly to SMTP. That is implemented.

The thing is that the majority of mainstream ESP’s (gmail, hotmail, etc.) use secure connections (SSL) when calling the SMTP Protocol (SMTPS).

SSL is not implemented in this addon. And anywhere in OF (I believe)

To solve this issue we need to implemented SSL (using the POCO lib) and call the secure connection before using the SMTP protocol.

I tried to solve this but unfortunately I didn’t manage to work around it. I’m still a newbie around here.

Note that there are different “credentials” for SSL and non-SSL connections for each ESP.

hmmm ok fair enough, think ill leave this one for a while then, dont have the time to get my hands dirty with this, was just going to make a little toy for some fun but ill take it up in the future when time permits.

Thanks for your response rgb.

(I’m not an expert in programming nor network protocols)
I was curious about this. I tried it with gmail and SSL is supposed to be there permanently so it didn’t work.
Anyways, I just tried to get the addon running so I tested the “sending” an email over to a small smpt client on my same ip (freesmtp) (this is not advertisement, google and run it at your own risk).

The addon does work. It does send something that this application thinks is an email. Freesmtp SSL can be disabled or wasn’t there (I don’t remember). What is important about this is that I think you can send emails with the addon to a small email server without SLL and have that program send the email over to any email service. I think Microsoft has IIS 7 or something like that.

It seems much simpler that adding poco in order to connect to gmail.

I really don’t know if this helps or if I’, going in the right direction. :smiley:
What do you guys think?

we are going to add ssl to the core soon, so i’ll update this addon so it can connect through ssl

That is GREAT news, maybe too great. :smiley:
Thank for all the hard work.

Hey guys,

Apologies, but is there any progress on the implementation of the SSL support for the addon?

Thanks,
Dean.

not yet, there’s already support for ssl under linux and android but we need libraries for osx and windows still. once that is in the core i’ll add support for ssl in ofxMailUtils

Just in case anyone is interested (and kind of in a hurry) we managed to tunnel an email out of ofxMailUtils without SSL onto a gmail account (that uses SSL) using OS X Mountain Lion using stunnel and fink
http://www.cs.umd.edu/faq/samba/stunnel-mac.html
With the following configuration:
http://users.zoominternet.net/~rockfox/Courier/stunnel.conf

This was solved by my coworker so I don’t have much more information about it, only that it works very well. :smiley:
Of course, I am all interested in proper SSL support but I will wait patiently for that.

Thanks for the reply and thanks for providing a workaround that may help me. I will give it a try tomorrow.

Many thanks,
Dean.