سؤال

I was coding a contact formula for a client and contacted their host service for port and mail server information. He tells me all mailing has to be done through the following JMail script. My website is ASP.NET with C# as codebehind. Anyone know how to use this JMail component (it's the first I have ever heard about it) or change the script to C# so I can work with it?

<%
set msg = Server.CreateOBject("JMail.Message")
msg.Logging = true
msg.silent = true
msg.Charset = "UTF-8"

msg.AddRecipient "MODTAGER EMAIL ADRESSE", "MODTAGER NAVN"

msg.From = "DIN EMAIL ADRESSE"
msg.FromName = "DIT NAVN"

msg.Subject = "EMNE"
msg.Body = "BESKED"

msg.MailServerUserName = "DIN EMAIL ADRESSE"
msg.MailServerPassword = "DIT EMAIL PASSWORD"

If not msg.Send("DIN MAILSERVER:587") Then
Response.write "
" & msg.log & "
"
Else
Response.write "Message sent succesfully!"
End If
%>
هل كانت مفيدة؟

المحلول

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top