comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » sending email via idl?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
sending email via idl? [message #60767] Wed, 04 June 2008 10:41 Go to next message
skapali is currently offline  skapali
Messages: 4
Registered: February 2008
Junior Member
Has anyone had any experience in writing an idl program to send email?
My software needs to have the ability to email an image attachment,
either when the user clicks a button, or as a notification at the end
of some computation.

Thanks!

Sudha
Re: sending email via idl? [message #82737 is a reply to message #60767] Fri, 11 January 2013 07:22 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le vendredi 11 janvier 2013 15:18:41 UTC+1, Helder a écrit :
> On Friday, January 11, 2013 2:26:30 PM UTC+1, alx wrote:
>
>> Le mercredi 4 juin 2008 19:41:49 UTC+2, sudha a écrit :
>
>>
>
>>> Has anyone had any experience in writing an idl program to send email?
>
>>
>
>>> My software needs to have the ability to email an image attachment,
>
>>
>
>>> either when the user clicks a button, or as a notification at the end
>
>>
>
>>> of some computation.
>
>>
>
>>>
>
>>
>
>>> Thanks!
>
>>
>
>>>
>
>>
>
>>> Sudha
>
>>
>
>>
>
>>
>
>> I never did it.
>
>>
>
>> I guess that the "modern" Windows solution would be to spawn a powershell script using the built-in SmtpClient.Send function.
>
>>
>
>> alain.
>
>
>
> Thanks Alain,
>
> I'm not that modern and didn't know what the powershell was.
>
> I googled a bit and found this: http://serverfault.com/questions/110057/easiest-way-to-send- an-email-from-the-command-line-using-windows-2003-r2
>
> where a one line spawn command is given:
>
>
>
> To make a one liner, save the following to a powershell script file (sendmail.ps1):
>
>
>
> param(
>
> [string] $From = "from@example.com",
>
> [string] $To = "to@example.com",
>
> [string] $Title = "title",
>
> [string] $Body = "body"
>
> )
>
> $SmtpClient = New-Object System.Net.Mail.SmtpClient
>
> $SmtpServer = "your.mail.host.com"
>
> $SmtpClient.host = $SmtpServer
>
> $SmtpClient.Send($From,$To,$Title,$Body)
>
>
>
> and then call the powershell:
>
> powershell.exe c:\path\to\sendmail.ps1 "from@example.com" "to@example.com" "title" "body"
>
>
>
> Just have to sort out the credentials (user and pwd)...
>
>
>
> Cheers,
>
> Helder

Hi Helder,
Powershell.exe is the new command line processor for Windows systems (not so new since it was already present in Windows Server 2003, and maybe also in 2000). It replaces the old-style, DOS-like cmd.exe command processor. It is quite powerfull, and resembles the famous DCL from Vax VMS.
alain.
Re: sending email via idl? [message #82738 is a reply to message #60767] Fri, 11 January 2013 06:18 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Friday, January 11, 2013 2:26:30 PM UTC+1, alx wrote:
> Le mercredi 4 juin 2008 19:41:49 UTC+2, sudha a écrit :
>
>> Has anyone had any experience in writing an idl program to send email?
>
>> My software needs to have the ability to email an image attachment,
>
>> either when the user clicks a button, or as a notification at the end
>
>> of some computation.
>
>>
>
>> Thanks!
>
>>
>
>> Sudha
>
>
>
> I never did it.
>
> I guess that the "modern" Windows solution would be to spawn a powershell script using the built-in SmtpClient.Send function.
>
> alain.

Thanks Alain,
I'm not that modern and didn't know what the powershell was.
I googled a bit and found this: http://serverfault.com/questions/110057/easiest-way-to-send- an-email-from-the-command-line-using-windows-2003-r2
where a one line spawn command is given:

To make a one liner, save the following to a powershell script file (sendmail.ps1):

param(
[string] $From = "from@example.com",
[string] $To = "to@example.com",
[string] $Title = "title",
[string] $Body = "body"
)
$SmtpClient = New-Object System.Net.Mail.SmtpClient
$SmtpServer = "your.mail.host.com"
$SmtpClient.host = $SmtpServer
$SmtpClient.Send($From,$To,$Title,$Body)

and then call the powershell:
powershell.exe c:\path\to\sendmail.ps1 "from@example.com" "to@example.com" "title" "body"

Just have to sort out the credentials (user and pwd)...

Cheers,
Helder
Re: sending email via idl? [message #82739 is a reply to message #60767] Fri, 11 January 2013 05:26 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le mercredi 4 juin 2008 19:41:49 UTC+2, sudha a écrit :
> Has anyone had any experience in writing an idl program to send email?
> My software needs to have the ability to email an image attachment,
> either when the user clicks a button, or as a notification at the end
> of some computation.
>
> Thanks!
>
> Sudha

I never did it.
I guess that the "modern" Windows solution would be to spawn a powershell script using the built-in SmtpClient.Send function.
alain.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: sending email via idl?
Next Topic: Error Handling Advice

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:20:26 PDT 2025

Total time taken to generate the page: 0.00447 seconds