LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ogic library error



smercurio_fc wrote:
Rolf: While the SMTP LIbrary that comes with LabVIEW could support SSL out of the box, as you indicated it doesn't. Since we were talking about the OGIC library I didn't really bring that up. I wasn't sure whether the OGIC library supported SSL, but based on what I could see it didn't seem as if it did, but I didn't write the code so I didn't want to say for sure. I have to admit I didn't really look into a great level of depth at the server response. The poster had asked whether the library worked with Gmail and when I tried I couldn't get it to work because of the SSL. I assumed the poster had the same issue since he was trying to use a free email server, and most (if not all), use SSL.


Hmm, how would you want to make the SMTP library support SSL out of the box? If I'm not misunderstanding it, SSL is an additional layer between TCP and the actual application layer transport protocol (SMTP here). While you could theoretically write a VI library that implementes SSL/TSL I don't think that is feasable. The SSL/TSL layer is inherently very state oriented and maintaining that in LabVIEW is not trivial. Quite possibly could LVOOP/GOOP or whatever OOP help here. But SSL is also not trivial in itself, with lots of cryptographic details and complications. Writing that from scratch is a major task that I wouldn't want to tackle, eventhough the technical challenge sounds interesting. That makes the only feasable implementation of SSL that of using an external shared library instead of the built in TCP primitives in any and every LabVIEW VI protocol suite that wants to make use of SSL.
 
And in that respect it is about the same work to have ogic support SSL as it would be with the built in SMTP library. The only difference is that the SMTP library is a bit cleaner programmed, while ogic looks a bit more like spaghetti to me.
 
Rolf Kalbermatter


Message Edited by rolfk on 12-17-2007 08:03 PM
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 23
(1,591 Views)
@smercurio

It doesn´t work with web.de, because if you change the "from address" the server (response) says invalid senders address and aborts the transmission!

It doesn´t matter if you try it with something in an email adress format like 111@222.com or if you put in just anything like 111222.

I think it is a protection thing against spam.

Do you have any idea to go arround it?

Thx

Jaehter
0 Kudos
Message 12 of 23
(1,585 Views)
Rolf: I think we're saying the same thing: while theoretically the SMTP stuff that comes with LabVIEW could be made to support SSL, it's not a trivial task. I wasn't saying how to do it because I haven't got a clue.

Jaehterr1: No, haven't got a way around it other than using another server. For instance, I was able to send an email message with the "From Address" left blank with the server I use and it went trough just fine. Like I said in my response, if the email server checks for this kind of stuff, which is clearly evident based on what you just said, then that's the way it is.
0 Kudos
Message 13 of 23
(1,581 Views)


Jaehter1 wrote:
@smercurio

It doesn´t work with web.de, because if you change the "from address" the server (response) says invalid senders address and aborts the transmission!

It doesn´t matter if you try it with something in an email adress format like 111@222.com or if you put in just anything like 111222.

I think it is a protection thing against spam.

Do you have any idea to go arround it?

Thx

Jaehter


That could only tell you the people from web.de. I guess they simply require you to use the same adress as from:, as was used to login to the server. Not really a strong security considering they allow auth login, but every little bit helps to make a web email provider get less attractive for spam abuse.
 
Of course paid mail accounts have much less restrictions except maybe requiring stronger login security, because there they know the account holder a bit better and can hunt him down much easier if he should try to abuse their services. And I can't blame them for such a differentiation.
 
Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 14 of 23
(1,580 Views)
good afternoon,

i'm trying to use the ogic library to send sms with gmail... i use stunnel to connect to gmail... and with the OGIC_smtp_main.vi, using the 127.0.0.1...

everything was ok but, i make the login, is accepted but i don't receive the email.

i receive this message in OGIC_smtp_main.vi: "open/create/replace file in OGIC_SMTP_senddata.vi > ogic_smtp_main.vi"

in OGIC_SMTP_SendData.vi i have this message:
"Subject: xxxxxxxx@gmail.com
To: xxxxx@gmail.com
X-Mailer: LabVIEW OGIC_SMTP Mailer
MIME-Version: 1.0
Content-Type: multipart/mixed;
    boundary="=====================_3297349422==_"
Status: RO

Message in MIME format

--=====================_3297349422==_
Content-Type: text/plain
 charset="us-ascii"
 format=flowed
Content-Transfer-Encoding: 8bit

reste


--=====================_3297349422==_--"

so, should it be ok????
what's the problem?

thanks


Message Edited by beer on 06-26-2008 01:35 PM
0 Kudos
Message 15 of 23
(1,435 Views)
gmail uses SSL. That library will not work to send email to gmail. You will need to use an external component, or if you're Windows you can use .NET. If you search the forums you will find examples of using .NET to send email.
0 Kudos
Message 16 of 23
(1,424 Views)
neither with stunnel??? the connection is ok... and as you saw it seems that everything is ok...

wich library should i use? i want to use gmail... so, needs to be a particular library no??

thanks
0 Kudos
Message 17 of 23
(1,417 Views)
Sorry, I've never used stunnel.
0 Kudos
Message 18 of 23
(1,410 Views)
I decided to try this out. I downloaded and installed stunnel. After hunting around for a while I managed to get an stunnel configuration to work. When I tried to send emails the first few times I was getting errors. Then, when I ran the code in highlight mode it worked. I got no errors and I received the email as if I had sent it from gmail. The content that my email client showed wasn't quite right. It looked like this:
X-Mailer: LabVIEW OGIC_SMTP Mailer
MIME-Version: 1.0
Content-Type: multipart/mixed;
    boundary="=====================_3297362437==_"
Status: RO

Message in MIME format

--=====================_3297362437==_
Content-Type: text/plain
 charset="us-ascii"
 format=flowed
Content-Transfer-Encoding: 8bit

test


--=====================_3297362437==_--

The actual content that I would see in my email client should have been just "test".

When I ran it again with no highlighting I did not get an error, but I also never got the email. This leads me to believe there may be some sort of timing problem somewhere. Not too surprising, since SSL slows down the communication. If I have a chance I'll try to play with this some more.


Message Edited by smercurio_fc on 06-26-2008 05:10 PM
0 Kudos
Message 19 of 23
(1,407 Views)
thanks smercurio...

but do you know any way to delay the connection?
0 Kudos
Message 20 of 23
(1,400 Views)