473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Send mail attachment

I've created a web service in .Net v2 that takes a couple of parameters
(ie; to address, subject and body) that sends an email.

I now want to extend this so that it can send attachments (ie; a PDF).
Is this possible? If so, how does one go about doing it?
Hope someone can help me out here.

Thanks in advance......

Feb 16 '06 #1
3 2002
I forgot to mention, that I'm accessing the webservice from a windows
form application.

Feb 16 '06 #2
Hi,
"Code Monkey" <dl********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I've created a web service in .Net v2 that takes a couple of parameters
(ie; to address, subject and body) that sends an email.

I now want to extend this so that it can send attachments (ie; a PDF).
Is this possible? If so, how does one go about doing it?


It is possible, all you have to do is send the file to the webservice, you
could load the file in a byte[] and then send this array. once in the server
side you recreate the file and attach it as usual.

I don't have code here with me, but it should be plain simple


--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 16 '06 #3
Hi Code Monkey,

Create and pass along MailAttachment objects. They are serializable.
Unfortunately they expect the file to exist on the filesystem on your side
(WinForm) so may be clunky if you already have the body in a byte stream.

Best personal regards,
-- Li-fan

--
Li-fan Chen
Software analyst/developer, Entrepreneur
Markham, Ontario, Canada
"Code Monkey" <dl********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I've created a web service in .Net v2 that takes a couple of parameters
(ie; to address, subject and body) that sends an email.

I now want to extend this so that it can send attachments (ie; a PDF).
Is this possible? If so, how does one go about doing it?
Hope someone can help me out here.

Thanks in advance......

Feb 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Robbie De Sutter | last post by:
Hello, How do I open a new, empty e-mail message from the default e-mail client whereby the sender is given and a file is attached? Currently I use the command (vb.net): ---...
2
by: Cimento Cola | last post by:
Hello all. Hope anyone can help me! I have this form, with: Please choose your file: (browse) The main purpose is the user to select a local file and then when he submits a mail should be...
1
by: Chitu03 | last post by:
Hi I am already send a mail using Php with some attachement into it. My Problem is the attachement file is in my Database(mysql). I don't know how can i get from database and then add to my mail....
1
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send...
1
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.