Search Results

Search found 1018 results on 41 pages for 'attachment'.

Page 3/41 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • A better way of representing File Attachment into a list(c#3.0)

    - by Newbie
    I have written List<Attachment> lstAttachment = new List<Attachment>(); //Check if any error file is present in which case it needs to be send if (new FileInfo(Path.Combine(errorFolder, errorFileName)).Exists) { Attachment unprocessedFile = new Attachment(Path.Combine(errorFolder, errorFileName)); lstAttachment.Add(unprocessedFile); } //Check if any processed file is present in which case it needs to be send if (new FileInfo(Path.Combine(outputFolder, outputFileName)).Exists) { Attachment processedFile = new Attachment(Path.Combine(outputFolder, outputFileName)); lstAttachment.Add(processedFile); } Working fine and is giving the expected output. Basically I am attaching the file to the list based on whether the file is present or not. I am looking for any other elegant solution than the one I have written. Reason: Want to learn differnt ways of representing the same program. I am using C#3.0 Thanks.

    Read the article

  • Sending an email with attachment from server side

    - by SaravananArumugam
    I have to create a word document in a specific format and send it as attachment to some email addresses. I have a preview screen for the report which on approval has to be send in email. This is an ASP.NET MVC 3 application. I am left with a few options here. I am creating the preview using html. I can convert this html into doc and send it, which would be a straight solution. But capturing the Response object's output is being a tough job. I thought of using Mail merge functionality of MS word, where I'll be filling the placeholders of the doc template. But the problem is conceptually, it doesn't appear to be mail merge. I have found someone suggesting to use RTF format and replace the placeholders with database values. Which is the right thing to do? What's the best solution here? Is there any other option than the three listed above?

    Read the article

  • How to read attachment messages without using scriptlets in JSP?

    - by Stardust
    Hi, I want to know how can I read attachment messages without using scriplets in JSP? After getting Message object as an attribute by using request object from servlets, how can I confirm whether Message content is an instance of Multipart or not without using scriplets like: if(message.getContent() instanceOf Multipart) How can I read the content of any file by using EL in JSP? As I can't see any getRead method in inputStream subclass.

    Read the article

  • j2me/BlackBerry - How to send Email with Attachment from Application?

    - by SWATI
    hey i am building an application in which user can send an email to a person. The user enters the email id of the person to whom email is to be sent in a Edit field and then presses a send button the email must be delivered with an attachment. how can i do it?????? i m really confused after googling. can someone tell me the exact way also,cant i send email from simulator if my cod file is unsigned thanks in advance

    Read the article

  • C# : Attachment from byte array?

    - by JL
    I have a byte[] which is a file, and I would like to send it as an attachment using System.Net.Mail. I noticed the attachment class has 1 overload which accepts a stream. Attachment att = new Attachment(Stream contentStream,string name); Is it possible to pass the byte[] through this overload?

    Read the article

  • How to send mail with large size attachment using System.Net.Mail to Google Apps ?

    - by Preeti
    Hi, I am trying to send mail with large size attachment upto (1MB,2MB). But sending mail fails.(Sending to Google Apps) as: MailItemEntry[] entries = new MailItemEntry[1]; String EmlPath = "C:\\testemail.eml"; String msg = File.ReadAllText(EmlPath); entries[0] = new MailItemEntry(); entries[0].Rfc822Msg = new Rfc822MsgElement(msg); How can i divide attachments into multi part? Exception I am getting while migrating this EML to Google apps is: {"The request was aborted: The request was canceled."}

    Read the article

  • Design considerations on JSON schema for scalars with a consistent attachment property

    - by casperOne
    I'm trying to create a JSON schema for the results of doing statistical analysis based on disparate pieces of data. The current schema I have looks something like this: { // Basic key information. video : "http://www.youtube.com/watch?v=7uwfjpfK0jo", start : "00:00:00", end : null, // For results of analysis, to be populated: // *** This is where it gets interesting *** analysis : { game : { value: "Super Street Fighter 4: Arcade Edition Ver. 2012", confidence: 0.9725 } teams : [ { player : { value : "Desk", confidence: 0.95, } characters : [ { value : "Hakan", confidence: 0.80 } ] } ] } } The issue is the tuples that are used to store a value and the confidence related to that value (i.e. { value : "some value", confidence : 0.85 }), populated after the results of the analysis. This leads to a creep of this tuple for every value. Take a fully-fleshed out value from the characters array: { name : { value : "Hakan", confidence: 0.80 } ultra : { value: 1, confidence: 0.90 } } As the structures that represent the values become more and more detailed (and more analysis is done on them to try and determine the confidence behind that analysis), the nesting of the tuples adds great deal of noise to the overall structure, considering that the final result (when verified) will be: { name : "Hakan", ultra : 1 } (And recall that this is just a nested value) In .NET (in which I'll be using to work with this data), I'd have a little helper like this: public class UnknownValue<T> { T Value { get; set; } double? Confidence { get; set; } } Which I'd then use like so: public class Character { public UnknownValue<Character> Name { get; set; } } While the same as the JSON representation in code, it doesn't have the same creep because I don't have to redefine the tuple every time and property accessors hide the appearance of creep. Of course, this is an apples-to-oranges comparison, the above is code while the JSON is data. Is there a more formalized/cleaner/best practice way of containing the creep of these tuples in JSON, or is the approach above an accepted approach for the type of data I'm trying to store (and I'm just perceiving it the wrong way)? Note, this is being represented in JSON because this will ultimately go in a document database (something like RavenDB or elasticsearch). I'm not concerned about being able to serialize into the object above, because I can always use data transfer objects to facilitate getting data into/out of my underlying data store.

    Read the article

  • Extract and view Outlook contacts attachment sent to Gmail

    - by matt wilkie
    A friend forwarded a contact list to my gmail account from Outlook (2007 or 2010, not sure which). I can see there is an attachment in gmail but when I save it to my local drive it's just a plain text file containing the text This attachment is a MAPI 1.0 embedded message and is not supported by this mail system. If I use gmail's "show original message" it contains in part: This is a multipart message in MIME format. ------=_NextPart_000_0016_01CC6656.CE12F030 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ------=_NextPart_000_0016_01CC6656.CE12F030 Content-Type: application/ms-tnef; name="winmail.dat" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="winmail.dat" eJ8+Ih0VAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQgABQAEAAAAAAAAAAAAAQkABAACAAAAAAAAAAEDkAYASAgAACgA --8<---snip---8<-- GUC/9NKH95rABgMA/g8HAAAAAwANNP0/pQ4DAA80/T+lDvAm ------=_NextPart_000_0016_01CC6656.CE12F030-- How do I save the attached winmail.dat properly, and open the winmail.dat and extract the contact list? I'm running Windows 7 x64, but have access to an ubuntu linux vmware appliance if needed. I have Outlook 2010, but can't use it to connect directly to gmail as pop3 and imap are blocked by the corporate firewall.

    Read the article

  • NoMethodError Rails multiple file uploads

    - by Danny McClelland
    Hi Everyone, I am working on getting multiple file uploads working for an model in my application, I have included the code below: delivers_controller.rb # POST /delivers def create @deliver = Deliver.new(params[:deliver]) process_file_uploads(@deliver) if @deliver.save flash[:notice] = 'Task was successfully created.' redirect_to(@deliver) else render :action => "new" end end protected def process_file_uploads(deliver) i = 0 while params[:attachment]['file_'+i.to_s] != "" && !params[:attachment]['file_'+i.to_s].nil? deliver.assets.build(:data => params[:attachment]['file_'+i.to_s]) i += 1 end end deliver.rb has_many :assets, :as => :attachable, :dependent => :destroy validate :validate_attachments Max_Attachments = 5 Max_Attachment_Size = 5.megabyte def validate_attachments errors.add_to_base("Too many attachments - maximum is #{Max_Attachments}") if assets.length > Max_Attachments assets.each {|a| errors.add_to_base("#{a.name} is over #{Max_Attachment_Size/1.megabyte}MB") if a.file_size > Max_Attachment_Size} end assets_controller.rb class AssetsController < ApplicationController def show asset = Asset.find(params[:id]) # do security check here send_file asset.data.path, :type => asset.data_content_type end def destroy asset = Asset.find(params[:id]) @asset_id = asset.id.to_s @allowed = Deliver::Max_Attachments - asset.attachable.assets.count asset.destroy end end asset.rb class Asset < ActiveRecord::Base has_attached_file :data, belongs_to :attachable, :polymorphic => true def url(*args) data.url(*args) end def name data_file_name end def content_type data_content_type end def file_size data_file_size end end Whenever I create a new deliver item and try to attach any files I get the following error: NoMethodError in DeliversController#create You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] /Users/danny/Dropbox/SVN/railsapps/macandco/surveymanager/trunk/app/controllers/delivers_controller.rb:60:in `process_file_uploads' /Users/danny/Dropbox/SVN/railsapps/macandco/surveymanager/trunk/app/controllers/delivers_controller.rb:46:in `create' new.html.erb (Deliver view) <% content_for :header do -%> Deliver Repositories <% end -%> <% form_for(@deliver, :html => { :multipart => true }) do |f| %> <%= f.error_messages %> <p> <%= f.label :caseref %><br /> <%= f.text_field :caseref %> </p> <p> <%= f.label :casesubject %><br /> <%= f.text_area :casesubject %> </p> <p> <%= f.label :description %><br /> <%= f.text_area :description %> </p> <p>Pending Attachments: (Max of <%= Deliver::Max_Attachments %> each under <%= Deliver::Max_Attachment_Size/1.megabyte%>MB) <% if @deliver.assets.count >= Deliver::Max_Attachments %> <input id="newfile_data" type="file" disabled /> <% else %> <input id="newfile_data" type="file" /> <% end %> <div id="attachment_list"><ul id="pending_files"></ul></div> </p> <p> <%= f.submit 'Create' %> </p> <% end %> <%= link_to 'Back', delivers_path %> Show.html.erb (Delivers view) <% content_for :header do -%> Deliver Repositories <% end -%> <p> <b>Title:</b> <%=h @deliver.caseref %> </p> <p> <b>Body:</b> <%=h @deliver.casesubject %> </p> <p><b>Attached Files:</b><div id="attachment_list"><%= render :partial => "attachment", :collection => @deliver.assets %></div></p> <%= link_to 'Edit', edit_deliver_path(@deliver) %> | <%= link_to 'Back', deliver_path %> <%- if logged_in? %> <%= link_to 'Edit', edit_deliver_path(@deliver) %> | <%= link_to 'Back', delivers_path %> <% end %> _attachment.html.erb (Delivers view) <% if !attachment.id.nil? %><li id='attachment_<%=attachment.id %>'><a href='<%=attachment.url %>'><%=attachment.name %></a> (<%=attachment.file_size/1.kilobyte %>KB) <%= link_to_remote "Remove", :url => asset_path(:id => attachment), :method => :delete, :html => { :title => "Remove this attachment", :id => "remove" } %></li> <% end %> I have been banging my head against the wall with the error all day, if anyone can shed some light on it, I would be eternally grateful! Thanks, Danny

    Read the article

  • How to Add an Attachment to a User Story using Rally REST .NET

    - by user1373451
    We're in the process of porting our .NET Rally code from SOAP to the REST .NET API. One thing I'm looking to replicate is the ability to upload attachments. I'm following a very similar procedure as to the one outlined in this posting: Rally SOAP API - How do I add an attachment to a Hierarchical Requirement Whereby the image is read into a System.Drawing.Image. We use the ImageToBase64 function to convert the image to a byte array which then gets assigned to the AttachmentContent, which is created first. Then, the Attachment gets created, and wired up to both AttachmentContent, and the HierarchicalRequirement. All of the creation events work great. A new attachment called "Image.png" gets created on the Story. However, when I download the resulting attachment from Rally, Image.png has zero bytes! I've tried this with different images, JPEG's, PNG's, etc. all with the same results. An excerpt of the code showing the process is included below. Is there something obvious that I'm missing? Thanks in advance. // .... Read content into a System.Drawing.Image.... // Convert Image to Base64 format byte[] imageBase64Format = ImageToBase64(imageObject, System.Drawing.Imaging.ImageFormat.Png); var imageLength = imageBase64Format.Length; // AttachmentContent DynamicJsonObject attachmentContent = new DynamicJsonObject(); attachmentContent["Content"] = imageBase64Format; CreateResult cr = restApi.Create("AttachmentContent", myAttachmentContent); String contentRef = cr.Reference; Console.WriteLine("Created: " + contentRef); // Tee up attachment DynamicJsonObject newAttachment = new DynamicJsonObject(); newAttachment["Artifact"] = story; newAttachment["Content"] = attachmentContent; newAttachment["Name"] = "Image.png"; newAttachment["ContentType"] = "image/png"; newAttachment["Size"] = imageLength; newAttachment["User"] = user; cr = restApi.Create("Attachment", newAttachment); String attachRef = attachRef.Reference; Console.WriteLine("Created: " + attachRef); } public static byte[] ImageToBase64(Image image, System.Drawing.Imaging.ImageFormat format) { using (MemoryStream ms = new MemoryStream()) { image.Save(ms, format); // Convert Image to byte[] byte[] imageBytes = ms.ToArray(); return imageBytes; } }

    Read the article

  • Sending an email attachment in memory using OpenXML

    - by ohnoesitsbroken
    I've got an Excel file that's built using OpenXML 2 and I want to send it as an email attachment. e.g. System.IO.MemoryStream stream = new System.IO.MemoryStream(); SpreadsheetDocument package = SpreadsheetDocument.Create(stream, SpreadsheetDocumentType.Workbook)) AddParts(package); //created using document reflector Saving the spreadsheet to a temp file using stream.WriteTo(new System.IO.FileStream(@"c:\test.xlsx", System.IO.FileMode.Create)); works fine. But trying to send the stream directly as an email attachment fails - just get an empty file attached to the email when I do System.Net.Mail.Attachment file = new System.Net.Mail.Attachment(stream, "MobileBill.xlsx", "application/vnd.ms-excel"); Anbody know how to do this?

    Read the article

  • How can I send email attachment without using an additional library in Perl?

    - by CheeseConQueso
    Hey, I was wondering if there is a way to attach files (specifically .csv files) to a mail message in Perl without using MIME::Lite or any other libraries. Right now, I have a 'mailer function' that works fine, but I'm not sure how to adapt it into attaching files. Here is what I have: open(MAIL, "|/usr/sbin/sendmail -t"); print MAIL "To: cheese\@yahoo.com\n"; print MAIL "From: queso\@what.com\n"; print MAIL "Subject: Attached is $filename\n\n"; print MAIL "$message"; close(MAIL); I think this is specific for UNIX.

    Read the article

  • Unable to migrate mail with large attachment upto 2 MB

    - by Preeti
    I am creating EML file with "System.Net.Mail".After that i am migrating it to Google Mail using google API ver 2. For small attachments it is working fine. But in case of large attachment upto (1 MB or 2 MB) it throwing exception "Request aborted". How can migrate mail with large file attachment? I got solution of sending large size attachment using System.Net.Mail. But how to implement it in case of Google apps? Thanx

    Read the article

  • Test for `point` within an attachment in `mail-mode`

    - by lawlist
    I'm looking for a better test to determine when point is within a hidden attachment in mail-mode (which is used by wl-draft-mode). The attachments are mostly hidden and look like this: --[[application/xls Content-Disposition: attachment; filename="hello-world.xls"][base64]] The test of invisible-p yields a result of nil. I am current using the following test, but it seems rather poor: (save-excursion (goto-char (point-max)) (goto-char (previous-char-property-change (point))) (goto-char (previous-char-property-change (point))) (re-search-backward "]]" (point-at-bol) t))) Any suggestions would be greatly appreciated. Here is the full snippet: (goto-char (point-max)) (cond ((= (save-excursion (abs (skip-chars-backward "\n\t"))) 0) (insert "\n\n")) ((and (= (save-excursion (abs (skip-chars-backward "\n\t"))) 1) (not (save-excursion (goto-char (previous-char-property-change (point))) (goto-char (previous-char-property-change (point))) (re-search-backward "]]" (point-at-bol) t)))) (insert "\n"))) GOAL:  If there are no attachments and no new lines at the end of the buffer, then insert \n\n and then insert the attachment thereafter. If there is just one new line at the end of the buffer, then insert \n and then insert the attachment thereafter. If there is an attachment at the end of the buffer, then do not insert any new lines.

    Read the article

  • Error in Outlook: "A program has attachment...open" when replying to email

    - by Billious
    Whenever I reply to an email in Outlook 2007, dialogue box pops up saying: "A program has the attachment <email subject> open. Changes to this file will be lost unless you save your changes to another file by clicking the Microsoft Office Button in the other program, and then clicking Save As." This happens whether the original email has an attachment or not. It's just an annoyance really - Outlook works fine in every other respect. It only started happening about a week ago. As far as I can remember I haven't installed any new software that is likely to have affected it.

    Read the article

  • Powershell script to send e-mails, losing text in e-mail attachment

    - by Beuy
    I have the following function to send e-mails in powershell with attachments: function SendMail(){ if($e -ine '') { $mail = New-Object System.Net.Mail.MailMessage $mail.From = $f; $mail.To.Add($t); $mail.Subject = $s; $att = New-Object System.Net.Mail.Attachment –ArgumentList $l $mail.Attachments.Add($att) $mail.Body = $b; $smtp = New-Object System.Net.Mail.SmtpClient($serv); $smtp.Send($mail); } } When I try to send a .txt file attachment it seems to strip out all of the information from within the text file. Any suggestions as to what's going wrong?

    Read the article

  • Powershell script to send e-mails, loosing text in e-mail attachment

    - by Beuy
    I have the following function to send e-mails in powershell with attachments: function SendMail(){ if($e -ine '') { $mail = New-Object System.Net.Mail.MailMessage $mail.From = $f; $mail.To.Add($t); $mail.Subject = $s; $att = New-Object System.Net.Mail.Attachment –ArgumentList $l $mail.Attachments.Add($att) $mail.Body = $b; $smtp = New-Object System.Net.Mail.SmtpClient($serv); $smtp.Send($mail); } } When I try to send a .txt file attachment it seems to strip out all of the information from within the text file. Any suggestions as to what's going wrong?

    Read the article

  • Font used for attachment title

    - by MartinC
    When I add an attachment to any document in Word 2010 the font used for the title has changed. I am not talking about adding a caption but the title that is shown automatically as part of the attachment icon: Anything which I attached before today is still showing with the correct font but any new items use a different font. This affects all types of attachments (for example, .msg, .xml, .css). I don't know what I have done to alter the behaviour. How can I change the font back to the default please?

    Read the article

  • Downloading attachments from Exchange with WebDAV

    - by arturito
    Hi there! I've been trying to retrive attachment from message in Exchange server using WebDAV.I don't know which version of Exchange the company is running. I'can successfully read messages and retrive list of attachments. However I am failing to save attachments. In both cases errors is: "The remote server returned an error: <403 Forbidden. Any idea what I'm doing wrong? My code: static void Main(string[] args) { HttpWebRequest Request; WebResponse Response; CredentialCache MyCredentialCache; string attachment = "http://mailserver/Exchange/Username/Inbox/Test.EML/Test.txt"; string strUserName = "username"; string strPassword = "password"; string strDomain = "domain"; try { // HttpWebRequest MyCredentialCache = new System.Net.CredentialCache(); MyCredentialCache.Add(new System.Uri(attachment), "NTLM", new NetworkCredential(strUserName, strPassword, strDomain)); Request = (HttpWebRequest)HttpWebRequest.Create(attachment); Request.Credentials = MyCredentialCache; Request.Method = "GET"; Response = (HttpWebResponse)Request.GetResponse(); } catch(Exception ex) { Console.WriteLine(ex.Message.ToString()); } try { //Web Client string downloadPath = "D:\\Downloads"; WebClient wcClient = new WebClient(); wcClient.Credentials = new NetworkCredential(strUserName, strPassword, strDomain); string file = Path.GetFileName(attachment); string filename = Path.Combine(downloadPath, file); wcClient.DownloadFile(attachment, filename); } catch (Exception ex) { Console.WriteLine(ex.Message.ToString()); } Console.ReadLine(); }

    Read the article

  • Email attachments sent to a group don't show up for some

    - by blsub6
    My boss sent out an email from my Exchange 2010 org and attached a PDF and a Word doc to it. He came back the next day and told me that some of the 8 or 10 people that received this email could open up the attachments no problem. The other 2 or 3 people, could not. One of these people who could not open the attachment, went so far as to call Comcast (his email service provider) and ask them where his attachments went. Comcast told this person that when they received the email, the attachment was 0 bytes in size. This may sound like more of a rant than a question but I'm genuinely concerned. Is there any possible way that something could have gone wrong on my end that sent out the email to some with the attachment and to some without?

    Read the article

  • Send Email from worker role (Azure) with attachment in c#

    - by simplyvaibh
    I am trying to send an email(in c#) from worker role(Azure) with an attachment(from blob storage). I am able to send an email but attachment(word document) is blank. The following function is called from worker role. public void sendMail(string blobName) { InitStorage();//Initialize the storage var storageAccount = CloudStorageAccount.FromConfigurationSetting("DataConnectionString"); container = blobStorage.GetContainerReference("Container Name"); CloudBlockBlob blob = container.GetBlockBlobReference(blobName); if (File.Exists("demo.doc")) File.Delete("demo.doc"); FileStream fs = new FileStream("demo.doc", FileMode.OpenOrCreate); blob.DownloadToStream(fs); Attachment attach = new Attachment(fs,"Report.doc"); System.Net.Mail.MailMessage Email = new System.Net.Mail.MailMessage("[email protected]", "[email protected]"); Email.Subject = "Text fax send via email"; Email.Subject = "Subject Of email"; Email.Attachments.Add(attach); Email.Body = "Body of email"; System.Net.Mail.SmtpClient client = new SmtpClient("smtp.live.com", 25); client.DeliveryMethod = SmtpDeliveryMethod.Network; client.EnableSsl = true; client.Credentials = new NetworkCredential("[email protected]", Password); client.Send(Email); fs.Flush(); fs.Close(); Email.Dispose(); } Please tell me where I am doing wrong?

    Read the article

  • Check mail attachment

    - by comii
    Hi! I am using vb.net to display email from outlook express! Everything work fine but when some message has attachment, i can not display message that email has attachment! This is my code: Private Sub LoginButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginButton.Click Dim oItem Dim i As Integer Dim Message As MAPI.Message Dim items As String() = New String(6) {} ' Items are the sender name,subject and date and read/unread value Dim PrSenderEmail, PrBodyEmail Session = CreateObject("MAPI.Session") ' we use a session object of MAPI Component Session.Logon(ProfileName:=Me.UserId.Text, ProfilePassword:=Me.Password.Text) Session.MAPIOBJECT = Session.MAPIOBJECT ' Folder = CObj(Session.Inbox) ' choose the folder Application = CreateObject("Outlook.Application") Namespace1 = Application.GetNamespace("MAPI") Namespace1.Logon() ' for getting the sender name and avoid security validation of Outlook/Exchange server 2003 ' we are using the "Redemption" component sItem = CreateObject("Redemption.SafeMailItem") Cursor.Current = Cursors.WaitCursor ' show we're busy doing the sort ListInbox.BeginUpdate() ' Notify that update begins ListInbox.Items.Clear() i = 0 ' first email message is 0 For Each Message In Folder.Messages Try i = i + 1 ' increment to the next email message 'get e-mail from the Inbox, can be any other item oItem = Application.Session.GetDefaultFolder(6).Items(i) ' GetDefaultFolder(6) refers to Inbox sItem.Item = oItem 'sItem is an object of Redemption COM and is used to get the senders name items(0) = sItem.SenderName() Catch items(0) = "error" End Try Dim objApp As Outlook.Application = New Outlook.Application 'Get Mapi NameSpace Dim objNS As Outlook.NameSpace = objApp.GetNamespace("MAPI") Dim oMsg As Outlook.MailItem Dim pp As String Dim b As Integer Dim objAttachment As Outlook.Attachment pp = Message.StoreID items(1) = Message.Subject items(2) = Message.TimeReceived items(4) = Message.Subject items(5) = Message.Size Dim objInbox As Outlook.MAPIFolder = objNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) Dim objItems As Outlook.Items = objInbox.Items items(5) = Message.Size.ToString / 1000 & "kb" If Message.Unread = True Then items(3) = "unread" Else items(3) = "read" End If ListInbox.Items.Add(New ListViewItem(items)) Next ListInbox.EndUpdate() ' Notify that update ends Cursor.Current = Cursors.Default End If End Sub How I can display message that email has attachment?

    Read the article

  • Sending mail with a Php with a pdf attachment

    - by Jake
    Hi, I'm trying to send an email from the php mail command. I've been able to what I've tried so far, but can't seem to get it to work with an attachment. I've looked around the web and the best code I've found led me to this: $fileatt_name = 'JuneFlyer.pdf'; $fileatt_type = 'application/pdf'; $fileatt = 'JuneFlyer.pdf'; $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); $data = chunk_split(base64_encode($data)); $MAEmail = "[email protected]"; mail("$email_address", "$subject", "$message", "From: ".$MAEmail."\n". "MIME-Version: 1.0\n". "Content-type: text/html; charset=iso-8859-1". "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" .$data. "\n\n" ); There are two problems when I do this. First, the contents of the email dissappear. Second, there is an error on the attachment. "Adobe Reader could not open June_flyer.pdf because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)" Any ideas of how to deal with this? Thanks, JB

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >