LL16: Export Mail (SMTP)

Guten Tag,

ich versuche mich gerade daran meinen generierten Export (PDF Datei) als Mail zu versenden. Dies möchte ich jedoch über einen STMP Server schaffen wo es zu Problemen kommt.

Die genaue Fehlermeldung ist die folgende…

Diese Fehlermeldung erhalte ich sogar schon wenn ich das beigelegte “vb.netexport” Sample ausprobiere. Der Code sieht dort wie folgt aus…

[CODE]Private Sub createButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles createButton.Click
Try
Dim cmd As OleDbCommand
cmd = CreateOleDbCommand()

        Dim provider As New DataProviders.DbCommandSetDataProvider
        provider.AddCommand(cmd, "Products")

        'D: An das DataView-Objekt binden
        'US: Now bind to the DataView
        LL.SetDataBinding(provider, "Products")

        Dim fileName As String
        Dim pathName As String

        Try

            ' Split the directory into strings
            pathName = Path.GetDirectoryName(fileNameBox.Text)
            fileName = Path.GetFileName(fileNameBox.Text)

        Catch exp As ArgumentException

            MessageBox.Show(exp.Message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information)

            Return
        End Try


        ' Set export options according to user's choice
        LL.ExportOptions.Clear()
        LL.ExportOptions.Add(LlExportOption.ExportTarget, exporterName)
        LL.ExportOptions.Add(LlExportOption.ExportFile, fileName)
        LL.ExportOptions.Add(LlExportOption.ExportPath, pathName)
        LL.ExportOptions.Add(LlExportOption.ExportQuiet, "1")

        If (showFileCheck.Checked) Then
            LL.ExportOptions.Add(LlExportOption.ExportShowResult, "1")
        Else
            LL.ExportOptions.Add(LlExportOption.ExportShowResult, "0")
        End If

        'To additonally send the result as eMail, you'd need the following code lines. This
        'will send an email to info@combit.net. Set the export format to HTML, as this sample
        'will send the result as HTML body of the mail. You need to set a valid SMTP server
        'using the LlExportOption.ExportMailSmtp... options.

        LL.ExportOptions.Add(LlExportOption.ExportSendAsMail, "1")
        LL.ExportOptions.Add(LlExportOption.ExportMailTo, "DK <SMTP:email@sample.de>")
        LL.ExportOptions.Add(LlExportOption.ExportMailSubject, "combit List & Label mail test")
        LL.ExportOptions.Add(LlExportOption.ExportMailShowDialog, "1")
        LL.ExportOptions.Add(LlExportOption.ExportMailSendResultAs, "text/html")

        ' Start Print
        LL.Print(0, LlProject.List, CurrentDir & "\simple.lst", False, LlPrintMode.Export, LlBoxType.StandardWait, Me.Handle, "Sample", False, "")
    Catch LlException As ListLabelException
        ' Catch Exceptions
        MessageBox.Show("Information: " + LlException.Message + vbCrLf + _
         "This information was generated by a List & Label custom exception.", _
         "Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Try
End Sub[/CODE]

Besagte Stelle habe ich für den Export auskommentiert. Und selbst in dem Sample funktioniert es nicht. Für mein eigenes Beispiel habe ich natürlich besagte Optionen für SMTP ausgefüllt (ob dies ausreicht kann ich nicht testen da das Sample schon nicht funktioniert).

Über jegliche Hilfen wäre ich sehr dankbar

Würde mal einfach die Adresse direkt (ohne <…>) bei ExportMailTo reinschreiben. Sonst kannst Du mal einen Blick in das Logfile werfen (mit dem Debug-Tool erstellt), da sieht man meist gleich mehr :-).

G.