|
-
Apr 20th, 2006, 09:38 AM
#1
Thread Starter
New Member
change font?
Is their a way to change the font of an email being sent throught smtp? my code is as follows.
thanks
ryan
Dim omsg As MailMessage = New MailMessage
Dim sBody As String = ""
sBody += ("Today's Date") & vbTab & vbTab & vbTab & todaysdate & vbCrLf
sBody += "Pick Up From:" & vbTab & vbTab & vbTab & pickup & vbCrLf
sBody += "Pick Up Address:" & vbTab & vbTab & vbTab & pickUpAddress & vbCrLf
sBody += "Contact Person" & vbTab & vbTab & vbTab & contact & vbCrLf
sBody += "What To Pick Up:" & vbTab & vbTab & vbTab & what & vbCrLf
sBody += "What To Deliver" & vbTab & vbTab & vbTab & deliverto1 & vbCrLf
sBody += "Delivery Address" & vbTab & vbTab & vbTab & deliverAddress & vbCrLf
sBody += "Contact Person" & vbTab & vbTab & vbTab & deliverTo & vbCrLf
sBody += "What to Deliver" & vbTab & vbTab & vbTab & whattoDeliver & vbCrLf
sBody += "Delivery Instructions" & vbTab & vbTab & special & vbCrLf
omsg.Body = sBody
mymessage.Body = omsg.Body
mymessage.From = "Sales"
mymessage.To = "[email protected]"
mymessage.Subject = "delivery"
mymessage.BodyFormat = System.Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "server1"
System.Web.Mail.SmtpMail.Send(mymessage)
MessageBox.Show("E-mail sent to Delivery")
-
Apr 20th, 2006, 09:41 AM
#2
-
Apr 20th, 2006, 09:48 AM
#3
Thread Starter
New Member
-
Apr 20th, 2006, 09:57 AM
#4
Frenzied Member
Re: change font?
i had this problem a while ago and i left it unsolved.
my project needed to make the user format the email body inside rtf control (Rich Text format). after that i tried to convert it from rtf to html but i failed miserably.
i am insterested to hear if any one have a solution
thx in advance
-
Apr 20th, 2006, 10:01 AM
#5
Re: change font?
when you send an email as text, it will be displayed using the default font that their email client uses to display text, a standard text email doesn't contain any formatting info.... like dotnetboy said.. you need to sent it as HTML, so you can mark up the text with your own desired font.. keep in mind the end user needs to have that font on their system to view it properly.. otherwise their email client will render the HTML with a default font like arial or tahoma...
-
Apr 20th, 2006, 10:54 AM
#6
Thread Starter
New Member
Re: change font?
Thanks. Ill just do that. The computer is for that purpose only. I got one more question. I havent dont any type of prog in the last 2 years so i'm rusty. I want to bold the label when the text box has focus. in my head i know the vb 6 way to do it but cant remember how in .net
-
Apr 20th, 2006, 10:57 AM
#7
Re: change font?
VB Code:
Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus
label1.Font = New Font(label1.Font, FontStyle.Bold)
End Sub
Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.LostFocus
label1.Font = New Font(label1.Font, FontStyle.Regular)
End Sub
-
Apr 20th, 2006, 11:00 AM
#8
Thread Starter
New Member
Re: change font?
i was kind of in that direction but you are the bomb thanks
ryan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|