0

just follow the simple example on the Synapse HowTo

But on the smtp.MailTo(sTo) Or smtp.MailFrom(sFrom) I get an 530 Error

Where can I set the Outgoing authentication ?

Update: ------

I am using GMail to this test, both for To and FROM accounts.

Thom A
  • 88,727
  • 11
  • 45
  • 75
Jlouro
  • 4,515
  • 9
  • 60
  • 91

1 Answers1

1

If you look at the example more carefully, you will see that the TSMTPSend class has UserName and Password properties and a Login() method.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Yes i did. And supplied it. Login is Ok, StartTLS is Ok, but the "to" and From are not ok ???!!! – Jlouro Jul 12 '12 at 21:33
  • 1
    Then either you are specifying the wrong credentials, or you are not providing email addresses that the server accepts, for instance if you are trying to relay to an outside network and the server does not allow relaying. Either way, the `530` reply should be telling you why the server rejected the command. That information should be in the `ResultString` and/or `FullResult` properties. – Remy Lebeau Jul 12 '12 at 21:37
  • I get: "530-5.5.1 Authentication Required. Learn more at" AND "530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 fu3sm1616628wib.10" – Jlouro Jul 12 '12 at 22:12
  • There you go then. The server is not accepting your login credentials. Did you read the URL the error message points to? Did you read GMail's documentation about how to connect with an SMTP client in the first place? – Remy Lebeau Jul 12 '12 at 23:01