Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net::SMTP #837

Closed
p5pRT opened this issue Nov 10, 1999 · 2 comments
Closed

Net::SMTP #837

p5pRT opened this issue Nov 10, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 10, 1999

Migrated from rt.perl.org#1765 (status was 'resolved')

Searchable as RT1765$

@p5pRT
Copy link
Author

p5pRT commented Nov 10, 1999

From derrick.jackson@sylvania.com

#!/usr/bin/perl -w

use Net​::SMTP;

### Host and share variables
  chomp(my($hostname) = `hostname`); # current host; only works
on NT not 95

my($smtphost) = "da_exc1.sylvania.com";

### DOES NOT WORK
my($recipients) =
q^'derrick.jackson@​sylvania.com' , 'derrick.jackson@​sylvania.com'^;
### DOES NOT WORK my($recipients) = "'derrick.jackson\@​sylvania.com',
'derrick.jackson\@​sylvania.com'";
print $recipients,"\n";

### Open a connection to the mail server
  my($smtp) = Net​::SMTP->new($smtphost,Hello=>$hostname);

#print $smtp->domain,"\n";

$smtp->mail($ENV{'USERNAME'}.'@​sylvania.com');
### THIS WORKS $smtp->to('derrick.jackson@​sylvania.com',
'derrick.jackson@​sylvania.com');
$smtp->to($recipients);

$smtp->data();
$smtp->datasend("To​: $recipients\n");
#$smtp->datasend("To​: Derrick Jackson; Derrick Jackson\n");
$smtp->datasend("Subject​: Mail Test\n\n");
$smtp->datasend("Hello world\n");
$smtp->dataend();

$smtp->quit;

@p5pRT
Copy link
Author

p5pRT commented Nov 10, 1999

From [Unknown Contact. See original ticket]

Why should it work?

Documentation says​:

  =item to ( ADDRESS [, ADDRESS [...]] )

  A synonym for C<recipient>.

Perhaps you meant @​recipients = qw^....^;

Actually, this is the wrong forum for this question. I believe
perl-libnet is the correct mailing list.

<chaim>

"JD" == Jackson, Derrick <derrick.jackson@​sylvania.com> writes​:

JD> ### DOES NOT WORK
JD> my($recipients) =
JD> q^'derrick.jackson@​sylvania.com' , 'derrick.jackson@​sylvania.com'^;
JD> ### DOES NOT WORK my($recipients) = "'derrick.jackson\@​sylvania.com',
JD> 'derrick.jackson\@​sylvania.com'";
JD> print $recipients,"\n";

--
Chaim Frenkel Nonlinear Knowledge, Inc.
chaimf@​pobox.com +1-718-236-0183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant