Click here to Skip to main content
15,900,110 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to Pin
Dalek Dave26-Jul-08 10:37
professionalDalek Dave26-Jul-08 10:37 
QuestionBytes sent and received by my application Pin
Ale.R.NET25-Jul-08 5:14
Ale.R.NET25-Jul-08 5:14 
QuestionGet type of inherited control Pin
Tom Deketelaere25-Jul-08 4:03
professionalTom Deketelaere25-Jul-08 4:03 
AnswerRe: Get type of inherited control [modified] Pin
Jon_Boy25-Jul-08 6:08
Jon_Boy25-Jul-08 6:08 
QuestionRecommendation for barcode readers Pin
David Mujica25-Jul-08 3:52
David Mujica25-Jul-08 3:52 
AnswerRe: Recommendation for barcode readers Pin
Luc Pattyn25-Jul-08 4:37
sitebuilderLuc Pattyn25-Jul-08 4:37 
QuestionHow to use content type to send mail Pin
nileshbahirshet25-Jul-08 2:12
nileshbahirshet25-Jul-08 2:12 
QuestionProblem in sending mails with images ... Pin
nileshbahirshet25-Jul-08 1:15
nileshbahirshet25-Jul-08 1:15 
please read carefully ...

I have a Picture box on the form ...
and I want to send that image with mail which appears in pictute box

Now I have a code that takes the image from folder structure
like c:\temp\aaa.jpg
It sends image with mail PERFECTLY....

but now I have to send mail which is store in memory stream .
not in file...

I have code
like


How can I send the image wich stored in memory stream ???

I have code
like

Public sub senmail(ByVal image1 as Image)

Dim subject As String = "Test EmbeddedImage"
Dim contentId As String = "image1"

Dim body As String = "Here is a picture of CRM:


Dim ClientPC As New SmtpClient("ddd.com", 25)

Dim Authentication As New Net.NetworkCredential("nmy@myserver.com", "password")

ClientPC.Credentials = Authentication
Dim mSender As New MailAddress("nmy@myserver.com")
Dim mReceiver As New MailAddress("nmy@myserver.com")
Dim sMail As New MailMessage(mSender, mReceiver)

sMail.Subject = "Testing embedded image 25 july 3.41 PM"
Dim av1 As AlternateView = AlternateView.CreateAlternateViewFromString(body, Nothing, MediaTypeNames.Text.Html)

Dim ct, ct1 As New ContentType
Dim ct2 As New ContentType("image")
ct.MediaType = MediaTypeNames.Image.Jpeg

Dim linkedResource1 As LinkedResource = New LinkedResource(ms, ct.MediaType) <----- gives error here

linkedResource1.ContentId = contentId

av1.LinkedResources.Add(linkedResource1)
sMail.AlternateViews.Add(av1)
sMail.IsBodyHtml = True
ClientPC.Send(sMail)


end sub
AnswerRe: Problem in sending mails with images ... Pin
ChandraRam25-Jul-08 1:42
ChandraRam25-Jul-08 1:42 
Questionmath.round function has a bug? Pin
CICCIOLO6924-Jul-08 22:51
CICCIOLO6924-Jul-08 22:51 
AnswerRe: math.round function has a bug? Pin
Guffa24-Jul-08 23:14
Guffa24-Jul-08 23:14 
GeneralRe: math.round function has a bug? Pin
supercat925-Jul-08 7:11
supercat925-Jul-08 7:11 
GeneralRe: math.round function has a bug? Pin
Stuart Dootson26-Jul-08 1:34
professionalStuart Dootson26-Jul-08 1:34 
GeneralRe: math.round function has a bug? Pin
supercat926-Jul-08 8:53
supercat926-Jul-08 8:53 
AnswerRe: math.round function has a bug? Pin
Chinners24-Jul-08 23:20
Chinners24-Jul-08 23:20 
AnswerRe: math.round function has a bug? Pin
Steve Mayfield25-Jul-08 12:24
Steve Mayfield25-Jul-08 12:24 
GeneralRe: math.round function has a bug? Pin
Guffa25-Jul-08 12:45
Guffa25-Jul-08 12:45 
GeneralRe: math.round function has a bug? Pin
Kel_25-Jul-08 23:16
Kel_25-Jul-08 23:16 
AnswerRe: math.round function has a bug? Pin
ghle26-Jul-08 4:52
ghle26-Jul-08 4:52 
AnswerRe: math.round function has a bug? Pin
Thomas Stockwell28-Jul-08 2:15
professionalThomas Stockwell28-Jul-08 2:15 
Questionpage authorization Pin
Ebube24-Jul-08 22:21
Ebube24-Jul-08 22:21 
AnswerRe: page authorization Pin
Steven J Jowett24-Jul-08 22:30
Steven J Jowett24-Jul-08 22:30 
GeneralRe: page authorization Pin
Ebube28-Jul-08 23:49
Ebube28-Jul-08 23:49 
QuestionXML Attributes from XML File Pin
Andrew Streetman24-Jul-08 16:11
Andrew Streetman24-Jul-08 16:11 
AnswerRe: XML Attributes from XML File Pin
Mycroft Holmes24-Jul-08 19:40
professionalMycroft Holmes24-Jul-08 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.