Resolved: The parameter 'from' cannot be an empty string.
Posted: Sat Dec 16, 2017 6:18 pm
I now get this error when trying to email a report. It occur after sub runs. So it is happening outside of the code I have created. I am not sure why its showing since its a Net.Mail.MailMessage error.I am not using that to send the the reports.
[ArgumentException: The parameter 'from' cannot be an empty string.
Parameter name: from]
System.Net.Mail.MailMessage..ctor(String from, String to)
Here is the code as it is today:
[ArgumentException: The parameter 'from' cannot be an empty string.
Parameter name: from]
System.Net.Mail.MailMessage..ctor(String from, String to)
Here is the code as it is today:
Code: Select all
Protected Sub StiWebViewer1_EmailReport(ByVal sender As Object, ByVal e As StiReportDataEventArgs)
Dim format As StiExportFormat
Dim report As StiReport = e.Report
Dim settings As StiExportSettings
Dim options As StiEmailOptions
options = New StiEmailOptions
format = StiExportFormat.Pdf
Try
options.AddressFrom = "xxxxxx@gmail.com"
options.Host = "smtp.gmail.com"
options.Port = 465
options.UserName = "xxxxxxx@gmail.com"
options.Password = "xxxxxxxx"
Catch ex As Exception
Dim strmsg As String = ex.Message
End Try
'Should be filled here
End Sub