1

Request your help for adding a table in the email in dot net nuke.

 Dim lnk As String = GetModLink()
        Dim msg As String = "Dear " & objUser.DisplayName & ",<br/><br/>"
        msg += "We are pleased to inform that you are approved. <br/><br/>"
        msg += "Thank you, we appreciate your support.<br/><br/>"


        msg += "Name                                            Code  <br/>"
        msg += "ABC                                             ABCD1   <br/>"
        msg += "zyx                                             zyxu1    <br/>"


        msg += DotNetNuke.Common.Globals.GetPortalSettings().PortalName

        Mail.SendMail(PortalSettings.Email, objUser.Email, "", "abc", msg, "", "HTML", "", "", "", "")

Just I want Name,Code,ABC,ABCD1,zyx,zyxu1 fields in a table format) inside the mail.How could i do that.

Name Code abc abcd1 zyx zyxu1 in a table format

Thanks in advance

user410565
  • 87
  • 1
  • 1
  • 4

2 Answers2

1

Format the text in 'msg' to be rendered like an HTML table (I can see you used br tag).

e.g.

msg += "<table><tr><td>column data</td></tr></table>"

Edit: changed '=' to '+='

Abhinav
  • 2,085
  • 1
  • 18
  • 31
  • Thanks.But now the message shown before the table (msg += "Thank you, we appreciate your support.) is not showing. – user410565 Aug 16 '12 at 04:13
  • Msg can be any well formed html text. msg = "

    Thank you, we appreciate your support.

    column data
    "
    – Abhinav Aug 16 '12 at 04:17
  • Previously i could see all the messages.Now when i add table for Name and code ,below message is not showing. msg += "We are pleased to inform that you are approved.

    " msg += "Thank you, we appreciate your support.

    "
    – user410565 Aug 16 '12 at 04:53
0

how to add Border in the following code. when added is showing error .

 msg += "<table><tr> <td>Name of Company</td><td>Code</td> </table> <tr> <td>Agent </td><td>ABC</td></tr></table>"
abc
  • 45
  • 1
  • 10