I use MIME:Lite to send emails with attachments.
I've been getting the odd error, i've checked out the MIME::Lite module and from what I can tell it uses Net::SMTP for actually sending the email.
The thing is I cannot see anywhere in the Net:SMTP documentation how you use Net::SMTP for sending attachments, hence moving to MIME::Lite.
Can anyone help understanding how MIME::Lite uses Net:SMTP for sending attachments, so I can go back to using the Net::SMTP module for sending my emails and have more control over the connection to the mail server.
This is the section in the MIME::Lite module where it seems to use Net::SMTP and where I am getting my error
the error I get is
would it be possible maybe if i changed the 'croak' to loop until it gets a connection, instead of erroring.
Or perhaps change the error message, with instructions to the user, or is it possible to send emails with attachments using Net::SMTP, as I was under the impression it wasn't and have not worked out how to do so if it is possible.
Any guidance on the best thing to do is appreciated.
Regards,
1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
I've been getting the odd error, i've checked out the MIME::Lite module and from what I can tell it uses Net::SMTP for actually sending the email.
The thing is I cannot see anywhere in the Net:SMTP documentation how you use Net::SMTP for sending attachments, hence moving to MIME::Lite.
Can anyone help understanding how MIME::Lite uses Net:SMTP for sending attachments, so I can go back to using the Net::SMTP module for sending my emails and have more control over the connection to the mail server.
This is the section in the MIME::Lite module where it seems to use Net::SMTP and where I am getting my error
Code:
### Create SMTP client:
require Net::SMTP;
my $smtp = MIME::Lite::SMTP->new(@args)
or Carp::croak("Failed to connect to mail server: $!\n");
the error I get is
Failed to connect to mail server: Bad file descriptor
would it be possible maybe if i changed the 'croak' to loop until it gets a connection, instead of erroring.
Or perhaps change the error message, with instructions to the user, or is it possible to send emails with attachments using Net::SMTP, as I was under the impression it wasn't and have not worked out how to do so if it is possible.
Any guidance on the best thing to do is appreciated.
Regards,
1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!