LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to send email to exchange server

how can i send an email (with LV7.1) to an acount on an MS-Exchange mailserver in a local intranet ?
Thanks in advance
Martin
0 Kudos
Message 1 of 11
(7,254 Views)
I've done this before using the ActiveX in Outlook. I could post some examples if that's an option.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 11
(7,254 Views)
Hi Ed,

that sounds great !

Please post it !

Thanks
Martin
0 Kudos
Message 3 of 11
(7,254 Views)
Here it is.

For multiple addreses, separate them with a semi-colon.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 4 of 11
(7,254 Views)
Anyone know how to disable the MS Outlook  message "A program is trying to send an email message on your behalf, do you want to allow this?" when using this email exchange server vi??:??
0 Kudos
Message 5 of 11
(6,537 Views)
That is an Outlook security setting. See here. Here is another solution (the original message is from somebody doing this in LabWindows, but the proposed solution will work with LabVIEW as well). An alternative is to not use Outlook. Is there a particular reason you're trying to use Outlook?
Message 6 of 11
(6,510 Views)

Thanks!

 

I am struggling ATM with an issue i have with all the ActiveX-VIs to send eMails over Outlook: Every eMail sent (every time the ActiveX gets called) starts a new instance of outlook.exe which

1.: Eats away 50 megs of RAM each time

2.: Stops Outlook with a message about too many connections to an .OST-file. (Can understand that with 5 Outlooks accessing the same file Smiley Wink)

 

Unfortunately i cannot use the Builtin-VIs to send eMails because i cannot send eMails to the outside-World of our company with them:

220 [Exchangeserver] Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at  Mon, 7 Sep 2009 17:26:07 +0200
250 [Exchangeserver] Hello [10.113.133.112]
250 2.1.0 [my_email]@roche.com....Sender OK
550 5.7.1 Unable to relay for [private]@gmx.net
554 5.5.2 No valid recipients
500 5.3.3 Unrecognized command

I dont know why...

But ATM the only way of successfully sending eMails to everywhere is with the ActiveX either from this thread or from NI directly (http://zone.ni.com/devzone/cda/epd/p/id/3708)

Unfortunately this works for only a few Mails and then the computer goes bogus because of too many started outlook-instances... Smiley Sad

 

So i ask: Is there a way in closing those darn instances again?

 

To the code: I used the VIs from the thread here and from the NI examples unmodified and filled in the Recipent, Topic and Body.¨

 

Help? Smiley Indifferent

 

0 Kudos
Message 7 of 11
(6,249 Views)

Sorry, I don't speak Twitter. What is ATM?

 

Have you tried using the .NET solution?

0 Kudos
Message 8 of 11
(6,223 Views)

smercurio_fc wrote:

Sorry, I don't speak Twitter. What is ATM?

 

Have you tried using the .NET solution?


LOL (you know this one, I hope)!  According to the Urban Dictionary, it means "At the moment" - among other things.  Inferring from context, I believe this is the definition we should be using.  😉

 

Bill

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 11
(6,213 Views)

Oh boy, my bad... Sorry!

Yes. ATM = At the moment.

Sorry... english is all except my mothers tongue... Swiss-German anyone? Smiley Wink

 

The .NET solutions dont work either for me. More down the post...

 

I jsut found out (20 mins ago) that this problem only exists on my Laptop i am using for LabVIEW-Coding and NOT on my PC i use for daily work (If i make an exe and let it run there).

 

Now there is something in outlook (2003) which is called something like offline synchronisation. This some sort of overrides the close-command from the ActiveX and waits till... Dont know... The exchange server? No idea...

 

I managed to send eMails over ActiveX over my own (nasty!!) solution: 

[VI] --> [Batch-file with parameters] --> [VBScript with parameters] --> [ActiveX] --> [Outlook] --> [eMail & SMS]

 

I told ya it is nasty! Hahaha! Smiley Very Happy 

 

The VI makes a system call to: C:\path\to\mailactivex.bat [recipent] "[Topic]" "[Body]"

The mailactivex.bat looks like: mailactivex.vbs %1 %2 %3

The mailactivex.vbs is:

Set MyApp = CreateObject("Outlook.Application")
Set MyItem = MyApp.CreateItem(0) 'MailItem
With MyItem
.To = Wscript.Arguments(0)
.Subject = Wscript.Arguments(1)
.ReadReceiptRequested = False
.Body = Wscript.Arguments(2)
End With
MyItem.Send

The middle step over the Batch-File is used here because otherwhise i dont call the VBScript with the current logged user which is very important to do because his credentials on the Net get used for the Outlook-autentification.

 

I posted this solution here only because maybe someone has a locked-out system and needs this user-autentification...

 

I will make a short test with the ActiveX-VI and report back here. Seems to my at the moment (aka "ATM" Smiley Wink ) like a problem of Outlook and not of LabVIEW or ActiveX.

Message Edited by RuferT on 09-09-2009 07:02 AM
0 Kudos
Message 10 of 11
(6,206 Views)