Author Topic: Problem sending Email  (Read 8572 times)

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Problem sending Email
« on: August 31, 2006, 04:52:06 AM »
Hi,

When I try to send an email I get the following error message in a windows message box

"java.netSocketException:Socket is not connected:connect"

I've tried TLserver versions 2.0, 2.1 and 3.0, connected to the comm 1 and comm 3.

I'm using Mozilla Thunderbird and MS outlook express as an email client.

any ideas?

Marcus

ps T100MD - 2424+
« Last Edit: August 31, 2006, 04:53:16 AM by Marcuspett »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Problem sending Email
« Reply #1 on: August 31, 2006, 09:20:32 AM »
Did you defined an SMTP server in TLServer? Most SMTP server must recognize that your system is a legitimate sender before accepting the connection. So if you have used the email client on the same PC that runs TLServer then it has informed your ISP that your IP address is legit to use the SMTP server.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Problem sending Email
« Reply #2 on: August 31, 2006, 09:42:28 AM »
Hi,

Yes,

smtp@wanadoo.co.uk.  This is the same for my home email

??

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Problem sending Email
« Reply #3 on: August 31, 2006, 09:57:45 AM »
Hi,

I left the setup email screen open and tried to send another email.  this time I had the following error.

"501 bad address syntax"

my code.

A$ = "xxxxx@xxxx1.wanadoo.co.uk"             ' sender
B$=  "xxxxx@xxxx1.wanadoo.co.uk"             recipient
C$ = "Daddy"                              ' subject
D$ = "The time is"+STR$(TIME[1])+":"+STR$(TIME[2])+". How are you doing?"   ' Message body

The sender and the recipient are different people i.e. my email and my partners email

' Raise the Email flag - TLServer will send the email later
' ===========================================================

emEvent[1] = 1


any ideas?

Marcus

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Problem sending Email
« Reply #4 on: August 31, 2006, 11:10:51 AM »
try to set SMTP server as "wanadoo.co.uk"  or "smtp.wanadoo.co.uk"
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Problem sending Email
« Reply #5 on: August 31, 2006, 03:01:43 PM »
Hi,

sorry typo last post.

My smtp setting in the tlserver is:-  "smtp.wanadoo.co.uk"

when I use this setting I get the "501 Bad address syntax" error box.

when I change this to "wanadoo.co.uk" nothing hapens, inc no errors or emails.

Just incase anything in my code is causing a problem, I'm using the email example in the tl5 usr directory only replacing the email addresses - still not having any joy

I'm back on com1 for the time being.

Marcus

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Problem sending Email
« Reply #6 on: August 31, 2006, 06:12:04 PM »
It probably has something to do with the SMTP server. Not all SMTP server allows simple "HELO" exchange with the email client like TLServer. You probably need to use TELNET and manually handshake with the SMTP server to find out why it doesn't work. This is beyond the normal support of the PLC topics so you probably need to consult tech expert on SMTP system. But I can give you some instruction as follow but I can't support you further than that:

you have to telnet to your smtp server from your computer in order to open the port. So lets do it one step at a time:

1) Click "Start" then "Run", then enter the following line into the "Open" text box:

   telnet smtp.wanadoo.co.uk 25

2) A console should open and it will attempt to connect to port 25 of smtp.wanadoo.co.uk If successful there will be some messages annoucing that it is an email server such as SENDMAIL.

3) Next, you have to enter the following:

   HELO yourname@yourdomain.com

If it says "501 5.0.0 Invalid domain name", then try the following:
   
   HELO yourdomain.com

4) If successful, it will say "....pleased to meet you". Then type the following:

   MAIL FROM: yourname@yourdomain.com

5) It should say "Sender OK". Then enter the following:

   RCPT TO: recipientname@recipientdomain.com

6) Next, enter

   DATA   and press <ENTER>

7) Now you can type in multiple lines of contents for the message body. When end, type a single "." on the beginning of the line and press <Enter> to end the message. The recipient should then receive an email if all is well.

If you are unable to proceed further then your smtp server is not cooperating and may require more sophiscated login method. In that case you may have to use a different SMTP server.

« Last Edit: August 31, 2006, 06:22:28 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Problem sending Email
« Reply #7 on: August 31, 2006, 11:17:55 PM »
Hi,

I tried running  telnet smtp.wanadoo.co.uk 25 from the command prompt  and I received the following response:-

Could not open connection to the host on port 25, connect failed.

I will keep you updated.

Marcus


BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Problem sending Email
« Reply #8 on: September 01, 2006, 01:28:13 AM »
Hi,

It seams in a bid to combat spam most ISP's over here block port 25 by default.

Can the TLServer be configured to use another stmp port?

I guess this is something that will cause more users problems in the future

Marcus

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Problem sending Email
« Reply #9 on: September 01, 2006, 08:58:46 AM »
At the moment TLServer does not have that option. How does Outlook Express connect to the SMTP server? What port does it use?

You may want to try to install your own personal SMTP server on your PC. The following link is one possibility:

http://www.postcastserver.com/download/release.aspx?p=3

I am not sure what effect that the ISP blocking of port 25 will have on the Postcast server. Postcast server will open port 25 for the TLServer since it is running on your PC. I I presume that once it get the email content it will be sent out using UDP directly from Postcast and will not need another TCP connection to port 25 of your ISP. But I am not 100% sure about it.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Problem sending Email
« Reply #10 on: September 01, 2006, 12:33:22 PM »
Hi,

TLServer does connect to postcast no promlems and tries to send email, but my ISP is still blocking this port even though this is the port assigned within outlook / thunderbird???? I think this is auth smtp?

I found http://www.authsmtp.com will allow connections though ports 23 2525 etc, I would have to pay a annual charge to access this smtp but without the TLserver being able to send via a different port  I think I'm running out of options!

Do the ISP's on your side of the pond allow connections to port 25?

Thanks for the help by the way!

Marcus

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Problem sending Email
« Reply #11 on: September 01, 2006, 02:56:23 PM »
Hi,

I tried the pro trial of postcast witch works!!!!!!!!.

Downside is its $49 of your fine bucks for a licence.

Any chance of releasing a new version of TLServer with a "define SMTP port number" setting box?

Marcus
« Last Edit: September 01, 2006, 03:53:10 PM by Marcuspett »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Problem sending Email
« Reply #12 on: September 01, 2006, 04:49:43 PM »
I am not sure if simply changing the port would solve the problem of ISP blocking the email port. Is your outlook express using a different port than 25? In the constantly changing battle plan between the spammers and the ISP it is a moving target.

The last time we saw, Postcast has a free version but their pro version cost money. $49 is not a great deal of money to pay if it works well for your intended application. Otherwise the trial version will probably satisfy your curiosity.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Problem sending Email
« Reply #13 on: September 02, 2006, 12:26:08 AM »
Hi,

No outlook is setup with port 25? So I?m not sure how my ISP sends, or maybe redirects to a different port?  Even if adding a "port number" box doesn't solve the issue, it will at least give people more options.

What if the TLServer used the same logon details i.e. account name and password the same as your email client, then the SMTP will probably allow the email through?

Interestingly enough, since installing the pro trial version of postcast, the free version (I didn't uninstall this just yet!) now works........ I'll wait until the pro version trial runs out to see what happens.

Again thanks for the help.


Marcus
« Last Edit: September 02, 2006, 01:00:38 AM by Marcuspett »