• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Newsletter

jones20

Neues Mitglied
Hallo, ich schreibe zur Zeit ein Programm in C# für einen Newsletter für Outlook und habe aktuell das Problem das Outlook einfach meine Breitenangaben nicht nimmt. Ich hoffe, ich bin hier im Forum richtig, da der Großteil schon HTML ist. Habe folgenden HTML Code der in die Email eingefügt wird (path, latestnewstitle usw. sind einfach nur text/richtextboxen, in denen letztendlich irgendwelcher Text steht). Habe es jetzt schon mit width in prozent, mit und ohne pixel... veruscht. Geklappt hat leider bisher nichts und ich bin nicht wirklich fit in HTML.

oMailItem.HTMLBody = "<table style=\"border: 1px solid black; width=723;\">" +
"<tr>" +
"<td colspan=2 style=\"border: 1px solid black;\"><img src="+ path +" alt=Logo></td>" +
"</tr>" +
"<tr>" +
"<td style=\"border: 1px solid black;\"> </td>" +
"<td style=\"border: 1px solid black;\"><font><b>" + ausgabe + "</b></font></td>"
"</tr>" +
"<tr>" +
"<td valign = top style=\"background-color:#3C474D; border: 1px solid black;\"><p><font color=#FF0000>" + latestnewstitle + "</font><br /><font color=white>" + latestnews + "</font></p></td>" +
"<td style=\"background-color:#2D383E; border: 1px solid black; width=300;\"><p><font color=white>In dieser Ausgabe:<br /><br /><br /><br />" + textausgabe + "</font></p></td>" +
"</tr>" +
"<tr>" +
"<td style=\"background-color:#657278; border: 1px solid black;\"><p><font color=#FF0000>" + mainartikeltitle + "</font><br /><font color=white>" + mainartikel + "</font></p></td>" +
"<td style=\"border: 1px solid black; width=300;\"rowspan=2><p><font color=#FF0000>" + artikeltitle + "</font><br /><font>" + artikeleins + "</font></p></td>" +
"</tr>" +
"<tr>" +
"<td style=\"border: 1px solid black; float=top;\"><p><font color=#FF0000>" + artikeltitle2 + "</font><br /><font>" + artikelzwei + "</font></p></td>" +
"</tr>" +
"<tr>" +
"<td style=\"border: 1px solid black;\"><font color=red>Interessante Links</font><br /><font>Link</font><br /><font>Link</font></td>" +
"<td style=\"border: 1px solid black;\"> </td>" +
"</tr>" +
"<tr>" +
"<td colspan=2 style=\"background-color:#2D383E; border: 1px solid black; width=717;\"><font color=white>" + copyright + "</font></td>" +
"</tr>" +
"<tr>" +
"<td colspan=2 style=\"border: 1px solid black;\"> </td>" +
"</tr>" +
"</table>";

Bin für jede Hilfe dankbar
 
Hallo,

ich habe mir jetzt nur die erste zeile angeschaut :O)

Code:
oMailItem.HTMLBody = "<table style=\"border: 1px solid black; width[B][COLOR=#ff0000]=[/COLOR][/B]723;\">" +

Code:
oMailItem.HTMLBody = "<table style=\"border: 1px solid black; width[COLOR=#ff0000][B]:[/B][/COLOR]723;\">" +
Cheffchen
edite: ach so css ist bei e-mail immer misst besser html also style ganz weg lassen wen es geht wie bei width, mach doch gleich width=723 ohne style.
 
Zurück
Oben