Hi Horst,
xiaef/viaef is the same thing, app export file for XIDE which used to be called VIDE. You need to import it with (main menu) Application->Import Application
Smtp relay server
Re: Smtp relay server
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Smtp relay server
Hello
Thanks Chris and Wolfgang
I coud make a Testfunction , but the Mails are not going out.
The error message says nothing to me, is it possible get better information about the error ?
Thanks Chris and Wolfgang
I coud make a Testfunction , but the Mails are not going out.
The error message says nothing to me, is it possible get better information about the error ?
Code: Select all
Error at SmtpSender:Process:
Fehler beim Senden von Mail.
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
bei _Swissbase-Functionen.Functions.TestMail(__Usual[] Xs$Args) in C:\XIDE\Projects\Swissbase\Applications\_Swissbase-Functionen\Klassen\SmtpSsl_Sender.prg:Zeile 185.
Code: Select all
FUNCTION TestMail () AS LOGIC
LOCAL oMessage AS MailMessage
LOCAL lReturn := TRUE AS LOGIC
LOCAL oSmtpClient AS SmtpClient
oMessage := MailMessage{}
oMessage:Subject := "Betrifft Auftrag KB 111111"
oMessage:Body := "<b>Das ist der E-Mail Text im MailBody als Html</b>"
oMessage:IsBodyHtml := TRUE
oMessage:Sender := MailAddress{ "bla@swissbase.ch"}
oMessage:@@From := MailAddress{ "bla@swissbase.ch" }
oMessage:@@to:Add ( "korijn@gmx.ch" )
oMessage:Headers:Add( "X-Mailer", "cXMailer was ist das " )
TRY
oSmtpClient := SmtpClient{}
oSmtpClient:Host := "mail.fritz.gmbh"
oSmtpClient:Port := 587
oSmtpClient:DeliveryMethod := SmtpDeliveryMethod.Network
oSmtpClient:UseDefaultCredentials := FALSE
oSmtpClient:Credentials := NetworkCredential{ "bla@swissbase.ch", "Passwort"}
oSmtpClient:EnableSsl := TRUE
oSmtpClient:Send( oMessage )
CATCH oEx AS Exception
myerr ( "Error at SmtpSender:Process:" + CRLF + oEx:Message + CRLF + oEx:StackTrace)
lReturn := FALSE
END TRY
oSmtpClient := NULL
oMessage := NULL
RETURN lReturn
Re: Smtp relay server
Hi Horst,
one note:
Explicit SSL (mostly port 465) is NOT supported by the SMTPClient class
Implicit SSL (mostly port 25) IS supported by the SMTPClient class
Wolfgang
one note:
Explicit SSL (mostly port 465) is NOT supported by the SMTPClient class
Implicit SSL (mostly port 25) IS supported by the SMTPClient class
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Re: Smtp relay server
Hello Wolfgang
Sorry , i dont understand what you wanna tell me.
I tryed 465 and 587 .
With thunderbird on the server i can send mails.
Do you think my little Testfunction shoud work ?
Do i have make some changing on the server ?
Is it possible to get more information form oEX ?
Ich steh am Berg
Horst
Sorry , i dont understand what you wanna tell me.
I tryed 465 and 587 .
With thunderbird on the server i can send mails.
Do you think my little Testfunction shoud work ?
Do i have make some changing on the server ?
Is it possible to get more information form oEX ?
Ich steh am Berg
Horst
Re: Smtp relay server
Hi Horst,
i use almost identical your code (ie Wolfgang's) over port 587, which works flawless for years, BUT sometimes my mails got blocked, if the receiver is with "gmx.de". For completeness, did you try another adress?
i use almost identical your code (ie Wolfgang's) over port 587, which works flawless for years, BUT sometimes my mails got blocked, if the receiver is with "gmx.de". For completeness, did you try another adress?
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Re: Smtp relay server
Hello Karl
I changed the sender and receiver and it works.
So i have to look why.
Thanks
Horst
I changed the sender and receiver and it works.
So i have to look why.
Thanks
Horst
Re: Smtp relay server
Hi Horst,
what I mean: for SMTP over SSL there are two different types: implicit SSL (that means that the server expects only SSL connections) and explicit SSL (that means that the client connects to the server and then asks to switch to SSL).
The SMTPClient class supports only implicit SSL and not explicit SSL.
Unfortunately the world of protocols is not always as easy as we hope.
Wolfgang
what I mean: for SMTP over SSL there are two different types: implicit SSL (that means that the server expects only SSL connections) and explicit SSL (that means that the client connects to the server and then asks to switch to SSL).
The SMTPClient class supports only implicit SSL and not explicit SSL.
Unfortunately the world of protocols is not always as easy as we hope.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it

