From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ogic library error

Hi,

I´m using following version of ogic library with Labview 8.2

http://forums.ni.com/attachments/ni/170/220419/1/OGIC_SMTP.zip

When I send an Email with the Ogic Library I recieve following Email without any File Attachment::
 
X-Mailer: LabVIEW OGIC_SMTP Mailer
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="=====================_3268708019==_"
Status: RO
Message in MIME format
--=====================_3268708019==_
Content-Type: text/plain
 charset="us-ascii"
 format=flowed
Content-Transfer-Encoding: 8bit
This just is a Test.
--=====================_3268708019==_
Content-Type: application/octet-stream;
 name="1.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="1.txt"

NTg2NTgyNzI0MjQyNTQzMjUyMzUz
 
--=====================_3268708019==_--

I'm using smtp.gmx.de and it works on Smtp-Test-Server-Vis...

Can somebody help me???

Please!




Message Edited by Jaehter on 12-12-2007 03:44 AM
0 Kudos
Message 1 of 23
(3,900 Views)
While I did not write the original code for that library I did make the modifications to allow it to adhere to email spec 822bis section 2.3 (no bare LFs). I just tested the library by sending an email with an attachment and it went through just fine. Can you attach the file you're trying to send? I doubt there's an issue with it, but you never know.

Also, what are the "Smtp-Test-Server-Vis"?
0 Kudos
Message 2 of 23
(3,878 Views)
Hi Smercurio,

I bit a little problem with my User Name, so now I`m Jaehter1, don´t be confused.

I´m very thankful for your help, but I´m very busy at the moment.

If it´s okay for you, I would right you more about my problem later today or tomorrow.

Thank you very much!

Jaehter


0 Kudos
Message 3 of 23
(3,858 Views)
Hi smercurio,

here are some more details about my problem:

I try to send an email with the ogic_smtp with my gmx.de Account including an attachment (txt-file)

Server: smtp.gmx.de
Port: 25
Filewall is switched off

There is no error! And this is the server response:

SERVER:    220 mail.gmx.net GMX Mailservices ESMTP {mp046}
CLIENT:   HELO localhost
SERVER:  250 mail.gmx.net GMX Mailservices {mp046}
CLIENT:   auth login
SERVER:  334 VXNlcm5hbWU6
SERVER:  334 UGFzc3dvcmQ6
SERVER:  235 2.7.0 Go ahead {mp046}
CLIENT:   MAIL FROM:<Digitaler.Bierwart@gmx.de>
SERVER:  250 2.1.0 ok {mp046}
CLIENT:   RCPT TO:<kx4@gmx.de>
SERVER:  250 2.1.5 ok {mp046}
CLIENT:   DATA
SERVER:  354 mail.gmx.net Go ahead {mp046}
CLIENT:   QUIT
SERVER:  250 2.6.0 Message accepted {mp046}

At my other gmx.de Account I recieve follwing message:

X-Mailer: LabVIEW OGIC_SMTP Mailer
MIME-Version: 1.0
Content-Type: multipart/mixed;
    boundary="=====================_3280495037==_"
Status: RO

Message in MIME format

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

Test Message

--=====================_3280495037==_
Content-Type: application/octet-stream;
    name="Test.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
    filename="Test.txt"


VGhpcyBpcyBhIHRlc3RmaWxl



--=====================_3280495037==_--


With no file attached!

I could imagine that there is a problem with the gmx-server and the incomming code send by ogic_smtp

I read in one off your threads that you use yahoo.com but you need to make a payment to use pop, is that correct?

Probably you could use my files an try it with your account, so we can see if its a mail-server-problem.

I tried to use a new created Gmail-Account, but the server response gives out an error about startlets???.


The best for me would be, if somebody could specify the ogic_smtp to gmx.de (because I have no idea about these TCP functions)

or

If you could send my a version of ogic_smtp and a name of a free-mail-service (without payment) which works fine?

Thanks a lot for your help!!!

Jaehter

Here is my txt-file and my ogic_smtp (LV 8.2) version you posted once...
Download All
0 Kudos
Message 4 of 23
(3,838 Views)
The Yahoo account that I had used was the one that's provided with the DSL account that we have here at work. The free Yahoo account does not provide POP/POP3 access. You need to get their "Mail Plus" service for that. I also tried it with the email server that's included with our domain name and web hosting with Network Solutions, and that worked just fine, since it's POP3.  Gmail includes POP/POP3, but it's all SSL. I don't believe the ogic_smtp library supports SSL. At least, I couldn't get it work with Gmail, even after enabling POP access. Outlook Express worked to get the email at Gmail downloaded, but Outlook Express supports SSL, which is why it probably worked. The Yahoo account that I tried and the Network Solutions do not use SSL. Does gmx.de use SSL?



0 Kudos
Message 5 of 23
(3,827 Views)


smercurio_fc wrote:
The Yahoo account that I had used was the one that's provided with the DSL account that we have here at work. The free Yahoo account does not provide POP/POP3 access. You need to get their "Mail Plus" service for that. I also tried it with the email server that's included with our domain name and web hosting with Network Solutions, and that worked just fine, since it's POP3.  Gmail includes POP/POP3, but it's all SSL. I don't believe the ogic_smtp library supports SSL. At least, I couldn't get it work with Gmail, even after enabling POP access. Outlook Express worked to get the email at Gmail downloaded, but Outlook Express supports SSL, which is why it probably worked. The Yahoo account that I tried and the Network Solutions do not use SSL. Does gmx.de use SSL?


No LabVIEW based SMTP library could support SSL out of the box. This is an extra encryption layer between TCP/IP and SMTP which would have to be implemented somehow. Doing that in LabVIEW itself is just not gonna work. Not because it couldn't be done, but because it is a lot of work, needs very specific knowledge about encryption technology and needs extensive testing and if possible peer review to make sure it does not have any security holes. Now, testing is very hard and even more work than programming and peer review is simply not gonna happen. There is virtually nobody with enough deep knowledge about encryption technology and at the same time being a proficient LabVIEW programmer. They are just not two domains that usually happen to fall together.
 
What I can see in the original transcript of the communication is that auth login seems to work although I'm not sure why the password and username seem to be transmitted from the server. That should be send by the client. However auth login is just about the worst method to authentificate, since the password is sent simply in BASE64 encoding. So anyone being able to listen in on the connection can easily extract the username and password. Because of that and the fact he herewith in fact published his username and password I would advice the OP to change his password for that account as soon as possible. 
 
And the file is attached in fact although the OPs mail reader seems not to be able to retrieve it as a separate attachment. I'm not exactly sure what could be the problem for this. Maybe the two single line characters at the beginning of the double line character separator line that is usually used to indicate a new part in the message stream?? There is a statment in the header boundary="=====================_3280495037==_" and that mail reader may take that literally and only consider it when a line starts exactly with that pattern, not when it happens anywhere in the data stream.
 
--=====================_3280495037==_
Content-Type: application/octet-stream;
    name="Test.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
    filename="Test.txt"


VGhpcyBpcyBhIHRlc3RmaWxl
 

 
This is the still embedded attachement in base64 encoding, simply a file with the text: This is a testfile
 
Rolf Kalbermatter


Message Edited by rolfk on 12-15-2007 11:12 AM
Rolf Kalbermatter
My Blog
Message 6 of 23
(3,816 Views)
Hi smercurio, hi rolfk...

First of all thank you very much for your reply.

Since the library works with smercurios mail server I think that the problem is the send data combined with my server (gmx.de).

Has I read in the FAQs of GMX  there a possibility to use SSL but you don`t have to! So this point should not be the problem!

The unsecure Login is not a real problem, because I want to use a new account for the communication (not my private one) which is only sending email of very low interest. So there are no incomming mails and nothing that has to be protected.


But since I have no knowlage about changing the Subvis I would try to find another Mail-Server which fits my conditions:

1. Without any payment
2. No SSL
3. POP/POP3
4. Works with ogic_smtp

So if anyone uses ogic_smtp and got such a Mail_server he could probably post it here so I can use it??? Please!

Or do you (Smercurio, rolfk) have any more ideas about solving my problem?

Jaehter
0 Kudos
Message 7 of 23
(3,809 Views)


Jaehter1 wrote:
Hi smercurio, hi rolfk...

First of all thank you very much for your reply.

Since the library works with smercurios mail server I think that the problem is the send data combined with my server (gmx.de).

But since I have no knowlage about changing the Subvis I would try to find another Mail-Server which fits my conditions:


Come on! Looking through the VIs and changing the formatting of that string shouldn't really be that much of a trouble. After all you are programming in LabVIEW, the VIs are open source and the change is nothing more than trying a few things. I can't try it as I have no GMX adres (and don't intend to get one) and always used our own company servers so far.
 
But the change that is probably necessary is more than trivial so a little exercise will help you get more proficient in LabVIEW too.
 
Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 23
(3,793 Views)
@rolfk 🙂

The problem is not changing the Labview Code, its the question, what gmx.de wants to hear...

But I found an other solution: web.de

So if anybody got the same problem with the ogic_smtp library and can use any account just create a new account on web.de and try it again.


But I also have one more question, which isn´t that important but it would be nice if it works:

Can you override the the "From Address" so that there is just a name instead of an emailaddress?

I saw some other email.vi which did this, but the code is different to the ogic_smtp.

Does anybody know, which command it is and how to change it?4

Thanks

Jaehter

0 Kudos
Message 9 of 23
(3,784 Views)
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.

Jaehter1: Technically, it doesn't matter what you put in the "From Address" field. The text in here goes into the MAILFROM field in the SMTP message. The email client sees this to display who the email is from. SPAMmers are known to not fill in this field, or fill it in with bogus information, so many email clients or email servers that run SPAM filters may drop messages with malformed MAILFROM fields.
0 Kudos
Message 10 of 23
(3,771 Views)