无法将邮件ID放入perl的系统命令中 [英] unable to put mail id within system command in perl

查看:71
本文介绍了无法将邮件ID放入perl的系统命令中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试从文件中检索邮件地址,并将每个邮件地址存储在一个变量中.我希望使用perl将邮件发送到这些电子邮件地址.我正在为此目的使用senditquiet.但是,在perl中我正在使用system命令.但它显示以下错误:

指定的字符串不是电子邮件地址所需的格式.

系统(''senditquiet -s smtp.gmail.com-端口587 -u myMailId@gmail.com -p my_password -f mail_id@gmail.com -t $mail_id@gmail.com-协议ssl-文件C:\ ComboFix. txt'');

$ mail_id是存储邮件地址的变量.

我什至尝试以下两个语句仍然无法消除错误.

1.系统("senditquiet -s smtp.gmail.com-端口587 -u myMailId@gmail.com -p my_password -f mail_id/@gmail.com -t $mail_id@gmail.com -protocol ssl-文件C:\ ComboFix.txt);
N.B. :请在此处标记我使用双引号,并且在@符号前加上"\"符号.

2. system(''senditquiet -s smtp.gmail.com -port 587 -u myMailId@gmail.com -p my_password -f mail_id@gmail.com -t $mail_id@gmail.com -protocol ssl -files C:\ ComboFix.txt'');
N.B.请注意,我在这里使用单引号.

请帮我一个人.

谢谢

Hi,

I am trying to retrieve mail addresses from a file and storing each of them in a variable. I wish to send mail to these email addresses using perl. I am using senditquiet for that purpose. But doing it in perl I am using the system command. But it shows the below error:

The specified string is not in the form required for an e-mail address.

system(''senditquiet -s smtp.gmail.com -port 587 -u myMailId@gmail.com -p my_password -f mail_id@gmail.com -t $mail_id@gmail.com -protocol ssl -files C:\ComboFix.txt'');

where $mail_id is the variable where I am storing the mail address.

I even tries the below two statements still the error does not go off.

1. system("senditquiet -s smtp.gmail.com -port 587 -u myMailId@gmail.com -p my_password -f mail_id/@gmail.com -t $mail_id@gmail.com -protocol ssl -files C:\ComboFix.txt");
N.B. : Please mark that here I am using the double quotes and also I put the ''\'' sign before @ symbol.

2. system(''senditquiet -s smtp.gmail.com -port 587 -u myMailId@gmail.com -p my_password -f mail_id@gmail.com -t $mail_id@gmail.com -protocol ssl -files C:\ComboFix.txt'');
N.B. Please note that I am using the single quotes here.

Please help me someone.

Thanks

推荐答案

mail_id@gmail.com -protocol ssl -files C:\ ComboFix.txt'');

其中
mail_id@gmail.com -protocol ssl -files C:\ComboFix.txt'');

where


mail_id是我存储邮件地址的变量.

我什至尝试以下两个语句仍然无法消除错误.

1.系统("senditquiet -s smtp.gmail.com-端口587 -u myMailId@gmail.com -p my_password -f mail_id/@gmail.com -t
mail_id is the variable where I am storing the mail address.

I even tries the below two statements still the error does not go off.

1. system("senditquiet -s smtp.gmail.com -port 587 -u myMailId@gmail.com -p my_password -f mail_id/@gmail.com -t


mail_id @ gmail .com -protocol ssl -files C:\ ComboFix.txt);
N.B. :请在此处标记我使用双引号,并且在@符号前加上"\"符号.

2. system(''senditquiet -s smtp.gmail.com -port 587 -u myMailId@gmail.com -p my_password -f mail_id@gmail.com -t
mail_id@gmail.com -protocol ssl -files C:\ComboFix.txt");
N.B. : Please mark that here I am using the double quotes and also I put the ''\'' sign before @ symbol.

2. system(''senditquiet -s smtp.gmail.com -port 587 -u myMailId@gmail.com -p my_password -f mail_id@gmail.com -t


这篇关于无法将邮件ID放入perl的系统命令中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆