hello, i am trying to open a ssh tunnel, mailman.SshTunnel(bSmtp, sshHostname, sshPort); mailman.SshAuthenticatePw(bSmtp, ssu, ssp);
and in a loop i want to send emails mailman.SendEmail(email); and in that loop, after i send 10 emails with a smtp server , i want to change the smtp server or to add other smtp creditals and keep sending email through the same tunnel, the problem is that when i change the smtp host or creditals in the loop, the tunnel is dropped.. is that normal? i am not using the mailman.SshCloseTunnel(bSmtp); command inside the loop, and i tried with and without the mailman.CloseSmtpConnection(); after each email or after the 10 emails i send with the same smtp, same result, the tunnel is dropped. i can share the code if someone need it, but it is from the examples, i only added a loop and some conditions to change the smtp host and users after i send 10 emails, if i don't change anything i can send 1000 emails without the tunnel to be dropped.
this is the chilkat log after i send the first email
============================== 1 email ==============================
``07:49:45 -0400 2 20-NO UCE. EarthLink does not authorize the use of its computers or network
220 equipment to accept, transmit, or distribute unsolicited e-mail.
250-AUTH PLAIN LOGIN CRAM-MD5
===============================10 email ====================================
this is the chilkatlog i get after i send the 10'th email
============================== 11 email ================================
and this is the log when i try to send number 11
the xxx.xxx.xxx.xxx - is my ip address, and the xx.xx.xx.xx is the ssh server ip
asked Jul 16 '12 at 08:10
Unfortunately, for now the ability to keep the same SSH tunnel but change the SMTP connection (i.e. open a new SSH channel) is not possible. This will be examined in a future version. (The current version at the time of this writing is v9.3.1)
answered Jul 17 '12 at 11:12
thank you for your answer, now, i have another idea, what if instead of using
we make a ssh tunnel forwarding the smtp port ex:
to a local port ex: 10000
the smtp will then respond at 127.0.0.1:10000 going through the ssh tunnel,
is it possible to keep this tunnel for more smtp users of the same smtp server?
i am making this tunnel to outgoing.verizon.net:465 forwarded to local port 10000,
i am sending 10 emails with the user firstname.lastname@example.org and his password pass1, after those 10 emails i
want to send using email@example.com and pass2
i have done a quick test and it seems to work BUT after a while the tunnel crashes or something throwing this:
and it never connects again, the timeout is not working, it tries to create a tunnel and send the email through it every second, it's not trying to send for 20 seconds as the ConnectTimeoutMs: 20000 says.. is there a way to reinitialize the Chilkat.SshTunnel sshTunnel = new Chilkat.SshTunnel(); so it is like the first time it loads? i have the
set if it fails to send email.
i also have the success = sshTunnel.IsAccepting;
witch is returning true after
success = sshTunnel.BeginAccepting(port);
And one more thing i get,
xml version="1.0" encoding="utf-8" ?
like there are no tunnels..
when i use the
right after i i test if the tunnel is accepting (success = sshTunnel.IsAccepting;)
i get this even when it works
answered Jul 17 '12 at 12:20