Click here to Skip to main content
15,901,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how i can send a repot in pdf by emain
Posted

Use the attachment property of the MailMessage object to attach the pdf file to the email.
 
Share this answer
 
Comments
irfanansari 11-Oct-11 9:55am    
i used that as first i use itestobject and then it create a pdf file at same place and then i used google email account to atteced and send it its work at my localhost but when i load it on domain so it give a error please u can see this
gifha.trivisionbtinc.com
bbirajdar 11-Oct-11 10:00am    
You need to assign the permission to the folder where this pdf file is created. Right click the pdf files folder and allow the aspnet process to have the full rights on this folder
bbirajdar 11-Oct-11 10:13am    
Your problem is that the application needs a full trust on the server to send the files.

This will help you
http://msdn.microsoft.com/en-us/library/wyts434y.aspx
irfanansari 13-Oct-11 4:42am    
please help me how i can write or change trust level
create a temp folder such as c:\temp\pdfs and give the IIS user read and write writes to it. Then use this to create your report prior to sending. Remember to delete the files after you send or you will run out of disc space at somepoint
 
Share this answer
 
Comments
irfanansari 13-Oct-11 4:42am    
but howi can create file or folder there is no allow here

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900