Setting the email address

I am using the following to set the email address but it appears blank both when pressing the mail button and when saving and selecting open in email

LL18

   _ll.ExportOptions.Add(LlExportOption.ExportMailTo, EmailTo)

Thanks for your help in advance

Hi Darren,

thank you for your post.

What content is handed over in the variable “EmailTo”? Please have a look into the .NET Export Sample:

…\combit\LL18\Programmable Samples and Declaration\Microsoft .NET\VB.NET Export Sample

[code]LL.ExportOptions.Clear()
LL.ExportOptions.Add(LlExportOption.ExportSendAsMail, “1”)
LL.ExportOptions.Add(LlExportOption.ExportMailTo, “combit GmbH SMTP:llmailtest@combit.net”)
LL.ExportOptions.Add(LlExportOption.ExportMailSubject, “combit List & Label mail test”)
LL.ExportOptions.Add(LlExportOption.ExportMailShowDialog, “1”)
LL.ExportOptions.Add(LlExportOption.ExportMailSendResultAs, “text/html”)

// Start export
LL.Export(exportConfiguration) [/code]

It should work with your code. You can have look into the debwin logfile to check what content is handed over to List & Label:

  1. Close your application.
  2. Run the debug tool “debwin3.exe” from "…\combit\LL18\Tools".
  3. Activate the option “Logging > Force Debug Mode” in debwin.
  4. Run your application and reproduce the mentioned behavior.
  5. You can read the logfile using a text editor, e.g. editor.exe

Best regards,

Christian Rauchfuß
Technical Support
combit GmbH

Hi Christian,

Thanks for coming back to me, here is a test based on the example, I really just want to populate to To box whether they press email or export

Public Function Print() As Boolean Implements IReporting.Print
If _ds.Tables.Count > 0 Then
Dim PrintStarted As Boolean = False

        If DebugMode Then
            _ll.Debug = LlDebug.Enabled And LlDebug.LogToFile
        End If
        PassDataStructure()
        _ll.ExportOptions.Clear()


        'Test
        _ll.ExportOptions.Add(LlExportOption.ExportSendAsMail, "1")
        _ll.ExportOptions.Add(LlExportOption.ExportMailTo, "combit GmbH <SMTP:llmailtest@combit.net>")
        _ll.ExportOptions.Add(LlExportOption.ExportMailSubject, "combit List & Label mail test")
        _ll.ExportOptions.Add(LlExportOption.ExportMailShowDialog, "1")
        _ll.ExportOptions.Add(LlExportOption.ExportMailSendResultAs, "text/html")


        If PrintTo = ReportingPrintTo.Preview Then
            'Test
            '_ll.ExportOptions.Add(LlExportOption.ExportMailTo, EmailTo)
            _ll.Core.LlPrintWithBoxStart(LlProject.List, ReportFile, LlPrintMode.Preview, LlBoxType.NormalMeter, OwnerHandle, "Printing report...")
        ElseIf PrintTo = ReportingPrintTo.PDF Then
            _ll.Core.LlPrintWithBoxStart(LlProject.List, ReportFile, LlPrintMode.Export, LlBoxType.NormalMeter, OwnerHandle, "Printing report...")
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "Export.File", ExportFilename)
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "Export.Path", ExportLocation)
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "Export.Quiet", "1")
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "PDF.CompressStreamMethod", "3")
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "PDF.JPEGQuality", "0")
            _ll.Core.LlPrintSetOptionString(LlPrintOptionString.Export, "PDF")
        ElseIf PrintTo = ReportingPrintTo.JPEG Then
            _ll.Core.LlPrintWithBoxStart(LlProject.List, ReportFile, LlPrintMode.Export, LlBoxType.NormalMeter, OwnerHandle, "Printing report...")
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "Export.File", ExportFilename)
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "Export.Path", ExportLocation)
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "Export.Quiet", "1")
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "PDF.CompressStreamMethod", "3")
            _ll.Core.LlXSetParameter(LlExtensionType.Export, "PDF", "PDF.JPEGQuality", "0")
            _ll.Core.LlPrintSetOptionString(LlPrintOptionString.Export, "PICTURE_JPEG")
        ElseIf PrintTo = ReportingPrintTo.Printer Then
            _ll.Core.LlPrintWithBoxStart(LlProject.List, ReportFile, LlPrintMode.Export, LlBoxType.None, OwnerHandle, "Printing report...")
        Else
            _ll.Core.LlPrintWithBoxStart(LlProject.List, ReportFile, LlPrintMode.Export, LlBoxType.None, OwnerHandle, "Printing report...")
            'll.Core.LlPrintSetOptionString(LL_OPTIONSTR_EXPORTS_ALLOWED, "PRN;HTML;PDF;XML;RTF;PICTURE_JPEG;XLS")
            _ll.Core.LlPrintOptionsDialog(OwnerHandle, "Choose printing options")


        End If
        PrintStarted = True

        If PrintTo = ReportingPrintTo.PDF Or PrintTo = ReportingPrintTo.JPEG Then
            _ll.ExportOptions.Add(LlExportOption.ExportFile, ExportFilename)
            _ll.ExportOptions.Add(LlExportOption.ExportPath, ExportLocation)
            If ExportQuiet Then
                _ll.ExportOptions.Add(LlExportOption.ExportQuiet, "1")
            Else
                _ll.ExportOptions.Add(LlExportOption.ExportQuiet, "0")
            End If
            _ll.ExportOptions.Add(LlExportOption.PictureJpegQuality, "50")
            _ll.ExportOptions.Add(LlExportOption.PdfCompressStreamMethod, "3")
            _ll.ExportOptions.Add(LlExportOption.PdfJpegQuality, "0")
        End If



        'Initialize first page. A page wrap may occur already caused by objects which are
        'printed before the table which is why the loop is needed
        While Not _ll.Core.LlPrint()
        End While

        If MultiTable Then
            Dim TableIndex As Integer
            Dim dv As New DataView
            Do
                dv = _ds.Tables(_ll.Core.LlPrintDbGetCurrentTable()).DefaultView
                dv.Sort = _ll.Core.LlPrintDbGetCurrentTableSortOrder()
                TableIndex = TableIndex + 1
                'TR 08.08.2014
            Loop Until (PrintDataView(dv, 0, TableIndex) <> LlConstants.WrnTableChange)
            'Loop Until (PrintDataView(dv, 0, TableIndex) <> LlConst.LL_WRN_TABLECHANGE)
        Else
            Dim AddRow As Boolean = False
            Dim rowCount As Integer = _ds.Tables(0).Rows.Count

            For i = 0 To rowCount - 1
                DefineFields(_ds.Tables(0).Rows(i))
                _ll.Core.LlPrintSetBoxText("Printing...", Convert.ToInt32(i / rowCount * 100))
                Dim nRet As Integer
                nRet = _ll.Core.LlPrintFields()
                'TR 08.08.2014
                'While (nRet = LlConst.LL_WRN_REPEAT_DATA)
                While (nRet = LlConstants.WrnRepeatData)
                    _ll.Core.LlPrint()
                    nRet = _ll.Core.LlPrintFields()
                End While
            Next
            DefineFields(_ds.Tables(0).Rows(0))
        End If
        _ll.Core.LlPrintEnd(0)
        Return True
        'Catch ex As ListLabelException
        '    ListLabelReturnMessage = ex.Message
        '    If PrintStarted Then
        '        _ll.Core.LlPrintEnd(0)
        '    End If
        '    Return False
        'Catch ex As Exception
        '    If PrintStarted Then
        '        _ll.Core.LlPrintEnd(0)
        '    End If
        '    Throw New Exception("Error in Reporting.Print - " & ex.Message, ex)
        'End Try
    Else
        Throw New Exception("Error in Reporting.Print - No data has been assigned.")
    End If
End Function

Any help on this Christian?

?

Hi Darren,

thank you for your post.

Your code looks fine. It should work. Have you created a debwin logfile? Here you can see what’s going on behind the scenes of List & Label. You can open the logfile with any text editor and search for “mailto”.

Please note that the LlXSetParameter functions are obsolete. We recommend to use the LlExportOption functions instead.

Best regards,

Christian Rauchfuß
Technical Support
combit GmbH