Save the password in a file and ask sendemail to read from it?

*Regards,
Chhatoi Pritam Baral*



On Fri, Jul 6, 2012 at 6:37 AM, Mihir Mehta <[email protected]>wrote:

> Hi people,
>
> I'm trying to modify the source of a program named sendemail (it's in
> Perl, you can examine it here:
> http://caspian.dotconf.net/menu/Software/SendEmail/), which serves to
> send email from the command line. I am modifying it to use
> Term::ReadKey to get the smtp password. An important use case for me
> is sending a mail whose contents are exactly the output of some other
> shell program, which I do by piping the output into sendemail. My
> issue is, however, that when sendemail's standard input is changed in
> this way, it is unable to accept the password (for the smtp server)
> from the command line (in the sense of displaying a prompt for a
> password, the same way as sudo does.) That would mean that the only
> way I can make it work with a redirected STDIN is to actually include
> my password as a command line option, which is unacceptable for
> obvious reasons. Can someone suggest a workaround for this?
>
> Thanks,
> Mihir.
>
> --
> Mihir Mehta,
> B. Tech. student,
> Department of Computer Science and Engineering,
> Indian Institute of Technology, Delhi.
>
> --
> Mailing list guidelines and other related articles:
> http://lug-iitd.org/Footer
>

-- 
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer

Reply via email to