Hi Gwyn,
Thank you for your reply. In fact, $name is a variable which is extracted
from a DB and it will change dynamically in main body, therefore, I cannot
put $name='[EMAIL PROTECTED]' directly.
Any idea?
Regard
Cary
Gwyn Roberts wrote:
> try
> From=> $name,
> $name = '[EMAIL PROTECTED]'
>
> gwyn
>
> Cary Hung wrote:
> >
> > Hi all,
> >
> > I'm trying to send email via perl script, however, I've the following
> > problem.
> >
> > use Mail::Sendmail;
> > sub mail_send
> > {
> > %mail = (
> > To => '[EMAIL PROTECTED]',
> > From => "$[EMAIL PROTECTED]",
> > subject => 'Send email',
> > Message => "\nThis is a very short message.\n"
> > );
> >
> > sendmail(%mail) or die $Mail::Sendmail::error;
> > print "OK. Log says:\n", $Mail::Sendmail::log;
> > }
> >
> > $name = 'peter';
> > mail_send;
> >
> > However, it displays '$[EMAIL PROTECTED]' instead of '[EMAIL PROTECTED]'.
> > Anyone can help?
> >
> > Thanks
> > Cary
>
> --
> ----------------
> Gwyn Roberts
> Centre For Applied Oceanography Canolfan Eigioneg Gymhywsol
> University Wales Bangor Prifysgol Cymru Bangor
> LL59 5EY
> tel +44 (0)1248 713808
> fax +44 (0)1248 71672
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs