-
Apr 2nd, 2017, 02:58 PM
#1
Thread Starter
Lively Member
SMTP Outlook 365 Citrix Issue
Hi,
I have a application at work that users use to help fill in templates, it then populates outlook with all relevant information to send.
My works is currently moving over to Outlook 365, so the users only have access to the web based outlook 365 logging in via a portal.
I have tested the following code on my PC and it does work ok, but the users use thin clients on Citrix, and the program just hangs when try to send email, it doesn't seem to timeout or anything, I have to use the Cirtix client to terminate the process.
I am hopeing you guys can throw some light on this.
Code:
Imports System.Net.Mail
Public Sub SendEmailOutlook365(sSubject As String, sBody As String, _
sTo As String, sCC As String, _
sFilename As String, _
sFrom As String, sPassword As String)
Try
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
' I have tried both f these and they work on my PC but I am outside the citrix platform
'Smtp_Server.Credentials = New Net.NetworkCredential(sFrom, sPassword, "mydomain.com")
Smtp_Server.Credentials = New Net.NetworkCredential(sFrom, sPassword)
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.office365.com" '"smtp.live.com"
Smtp_Server.Timeout = 10000
e_mail = New MailMessage()
e_mail.From = New MailAddress(sFrom)
e_mail.To.Add(sTo)
e_mail.To.Add(sFrom)
e_mail.Subject = sSubject
e_mail.IsBodyHtml = False
e_mail.Body = sBody
Smtp_Server.Send(e_mail)
MsgBox("Mail Sent")
Catch error_t As Exception
MsgBox(error_t.ToString)
End Try
End Sub
-
Apr 5th, 2017, 05:30 AM
#2
Thread Starter
Lively Member
Re: SMTP Outlook 365 Citrix Issue
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|