Search Results

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

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

  • How to send email with attachment through code + j2me+blackberry

    - 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

  • Paperclip: delete attachment and "can't convert nil into String" error

    - by snitko
    I'm using Paperclip and here's what I do in the model to delete attachments: def before_save self.avatar = nil if @delete_avatar == 1.to_s end Works fine unless @delete_avatar flag is set when the user is actually uploading the image (so the model receives both params[:user][:avatar] and params[:user][:delete_avatar]. This results in the following error: TypeError: can't convert nil into String from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:40:in `dirname' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:40:in `flush_writes' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:38:in `each' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:38:in `flush_writes' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/attachment.rb:144:in `save' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/attachment.rb:162:in `destroy' from /Work/project/src/app/models/user.rb:72:in `before_save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:347:in `send' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:347:in `callback' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:249:in `create_or_update' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2538:in `save_without_validation' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/validations.rb:1078:in `save_without_dirty' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/dirty.rb:79:in `save_without_transactions' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `send' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `with_transaction_returning_status' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:182:in `transaction' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:228:in `with_transaction_returning_status' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:208:in `rollback_active_record_state!' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:723:in `create' I assume it has something to do with the avatar.dirty? value because when it certainly is true when this happens. The question is, how do I totally reset the thing if there are changes to be saved and abort avatar upload when the flag is set?

    Read the article

  • ASP.NET MVC send an email attachment which is a password encrypted PDF file

    - by Pinu
    I am working on document storage and retrieval application. In which i display the pdf document as an png image , but i have a email button on the top. On clicking that the user would be able to provide an email address to which the document needs to be sent, and I need to send this pdf as an attachment. I need to password protect the file for security reasons. I have no clue on how i can do this in asp.net mvc.

    Read the article

  • Script to parse emails for attachments

    - by Swanny
    I am looking for a way to monitor a Linux mbox email account, when an email arrives I would like to download an attachment from the email and save the attachment (CSV file) so that it may be used by a PHP script. What would be the best way of going about this? I have looked at PHP's IMAP functions but this does not appear to be the most appropriate method when a simple bash script may be all that is required?

    Read the article

  • Outlook 2007 Clients attachments not opening correctly

    - by Az
    Hello, Thanks for taking the time to read this. We are having an issue on our Terminal Server clients that has me perplexed. We are running Server2003 x64 and Exchange 2007 environment. When we attempt to open an attachment for example .jpeg and the user selects to open the file, it prompts them to select a program to open the file with. The file associations apear to be fine, if I save the document to the desktop and open it, it opens with the correct program automatically. If i select "always open using this program" it will then open automatically, but I don't want to have to do this for all file types we open regularly on each client. Is this some sort of Exchange server security setting that is forcing them to associate the file? Does outlook or exchange maintain its own file association database? Thanks for reading!

    Read the article

  • Domino 8.5.3: Attaching an Object Residing on Server (Lotusscript preferred)

    - by Void
    Not sure if this question is more appropriate for ServerFault or StackOverflow, sorry if it should belong elsewhere! I am working on an application and one of the function is to automatically send an email with an attachment. I can code the application to attach the object when it resides on local or on a mapped drive. Newbie Question: Is there a way to have the object reside on the Domino server, and still be able to point to it and have the application automatically attach and send? Is there any method that allows me to do this? Users have no direct access to the server/filesystem, so mapped drive of the Domino server is out of the question. Hope someone can shed some light on this question. Thanks!

    Read the article

  • Facebook Invalid OAuth access token signature trying to post an attachment to group wall from PHP

    - by Volodymyr B
    I am an administrator (manager role) of a Facebook Group. I created an app, and stored its id and secret. I want my app to be able to post something on the Facebook group's feed. But when I attempt to post, I get the error 190 Invalid OAuth access token signature, even though I able to successfully obtain the access_token with publish_stream and offline_access scopes. It has the form of NNNNNNNNNNNNNNN|XXXXXXXXXXXXXXXXXXXXXXXXXXX, where N is a number (15) and X is a letter or a number (27). What should I do more to get this accomplished? Here is the code I am using: public static function postToFB($message, $image, $link) { //Get App Token $token = self::getFacebookToken(); // Create FB Object Instance $facebook = new Facebook(array( 'appId' => self::fb_appid, 'secret' => self::fb_secret, 'cookie' => true )); //$token = $facebook->getAccessToken(); //Try to Publish on wall or catch the Facebook exception try { $attachment = array('access_token' => $token, 'message' => $message, 'picture' => $image, 'link' => $link, //'name' => '', //'caption' => '', 'description' => 'More...', //'actions' => array(array('name' => 'Action Text', 'link' => 'http://apps.facebook.com/xxxxxx/')) ); $result = $facebook->api('/'.self::fb_groupid.'/feed/', 'post', $attachment); } catch (FacebookApiException $e) { //If the post is not published, print error details echo '<pre>'; print_r($e); echo '</pre>'; } } Code which returns the token //Function to Get Access Token public static function getFacebookToken($appid = self::fb_appid, $appsecret = self::fb_secret) { $args = array( 'grant_type' => 'client_credentials', 'client_id' => $appid, 'client_secret' => $appsecret, 'redirect_uri' => 'https://www.facebook.com/connect/login_success.html', 'scope' => 'publish_stream,offline_access' ); $ch = curl_init(); $url = 'https://graph.facebook.com/oauth/access_token'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $args); try { $data = curl_exec($ch); } catch (Exception $exc) { error_log($exc->getMessage()); } return json_encode($data); } If I uncomment $token = $facebook->getAccessToken(); in the posting code, it gives me yet another error (#200) The user hasn't authorized the application to perform this action. The token I get using developers.facebook.com/tools/explorer/ is of another form, much longer and with it I am able to post to the group page feed. How do I do it without copy/paste from Graph API Explorer and how do I post as a group instead of posting as a user? Thanks.

    Read the article

  • Fixed div background

    - by Fahad
    I want to create a layout where I want to display an image to the left and content on the right. The image should stay constant when the content scrolls. The css I'm using: <style type="text/css"> html, body { margin:0; padding:0; } #page-container { margin:auto; width:900px; background-color:Black; background-image:url('images/desired_layout.png'); background-attachment: fixed; background-repeat:no-repeat; } #main-image { float:left; width:250px; height:687px; background-image:url('images/desired_layout.png'); background-attachment:fixed; background-repeat:no-repeat; } #content { margin-left:250px; background-color:Olive; height:800px; width:650px; } </style> The HTML: <div id="page-container"> <div id="main-image"></div> <div id="content"></div> </div> Alot of time on this site and I have understood that background-attachment:fixed positions the image in the entire viewport and not the element it is applied to. My question is how do I go about creating that kind of layout? I do not want to give that image as a background image, as if the window is resized, it might get hidden. I want scrollbars to appear if the window size is less than 900px( my page width) so that the image can be viewed at all times. That happens with this code, however I would like the image to start at my element instead. How do I go about doing this?? Thanks in Advance :)

    Read the article

  • Classic ASP - Email form with attached file - please help

    - by apg1985
    Hi Guys, Ive got abit of a problem ive got an email web form that send the input to an email address but what I now need is a file input field were the user can also send an image as an attachment. So contact name, logo (attachment). Ive been told in order to send the attachment it needs to be saved in a folder on my hosting before it can be sent. Ive spoken to the hosting company and they dont have anything in place to make this easier such as aspupload. In the form name="contactname" and name="logo" I have a folder in the root directory called logos (this asp page also exists in the root directory) Man I hope someone can help me spent along time looking for answers Dim contactname, logo contactname = request.form("contactname") If request("contactname") <> "" THEN Set myMail=CreateObject("CDO.Message") myMail.Subject="Form" myMail.From="web@email" myMail.To="web@email" myMail.HTMLBody = "" & contactname & "" myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "relay.host" myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 myMail.Configuration.Fields.Update myMail.Send set myMail=nothing

    Read the article

  • Email attachment parsing via mime4j

    - by Ashish
    Hi, I am using a small java smtp library (http://code.google.com/p/subethasmtp/), by this I need to parse the incoming emails in separate components viz body, attachments etc. I am trying to use mime4j , but the documentation suggests that mime4j can only give event notification or token notification and nothing else. For stripping out body and attachments etc I had to use my own custom logic inside the event handlers. Is my observation correct? If yes then how can I use mime4j to use for my requirement. Please suggest. I badly need an approach that takes in the smtp data stream and returns me with an array of attachment references or streams in fully parsed out form in java. Please help. Thanks in advance Ashish Sharma

    Read the article

  • Using background-attachment:fixed in safari on the ipad

    - by chris_bcn
    I'm looking to recreate an effect similiar to the popular science app. Basically have one big background image and then have HTML/CSS layer on top of that. When the user scrolls the content, then background-position of the image should remain in place, and not scroll. Obviously in a 'regular' browser I would use background-attachment:fixed, but this doesn't seem to work on the ipad. I know position:fixed doesn't work as you might expect according to safari spec - but is there any way of achieving this?

    Read the article

  • Using rest-client to upload a paperclip attachment but getting no file found error

    - by Angela
    Hello, I have a paperclip attachment that I wan to upload to a web-service using rest-client. However, when I try to run it, I get an error: No such file or directory - /system/postalimages/1/original/postcard-1.png?1274635084 But the file exists for sure: I see it in my directory. How do I debug this? Here is the code in my controller which makes the upload: def upload @postalcard = Postalcard.find(:last) response = RestClient.post('http://www.postful.com/service/upload', { :upload => { :file => File.new(@postalcard.postalimage.url,'rb') #paperclip file path } }, #end payload {"Content-Type" => @postalcard.postalimage.content_type, "Content-Length" => @postalcard.postalimage.size, "Authorization" => 'Basic dGltZm9uZzg4OEBnbWFpbC5jb206ZDlQcTVKUU4='} # end headers ) #close arguments to Restclient.post return response.body end

    Read the article

  • Send files using Content-Disposition: attachment in parallel

    - by Manos Dilaverakis
    I have a PHP page that sends a file to the browser depending on the request data it receives. getfile.php?get=something sends file A, getfile.php?get=somethingelse sends file B and so on and so forth. This is done like so: header('Content-Disposition: attachment; filename='. urlencode($filename)); readfile($fileURL); It works except it can only send one file at a time. Any other files requested are send in linear fashion. One starts as soon as another finishes. How can I get this to send files in parallel if the user requests another file while one is downloading?

    Read the article

  • Limitation of Attachment size when using SMTP

    - by Gas Gemba
    Hi, I wrote a C++ program to send a mail using SMTP. But when I attach any files I notices that a single file's size always is limited to 808 bytes. As an example if I send a text file with 10 KBs, when I download the attachment it has only text worth 808 bytes. If the large file is a zip file, it gets corrupted in unzipping obviously due to CRC failure. I used a MAPI library to send larger files without a problem. Is this a network limitation of SMTP? Can someone please explain why this is happening?? Thank You!!!

    Read the article

  • iCalcreator 2.6 event creation sent in an email w/o attachment

    - by Jonas
    G'day everyone, I am currently trying to send meeting invitations to Outlook recipients. After reading several blogs and various literature iCalcreator seems to be the most complete iCalendar PHP class available. And the documentation is just...crazily complete. If creating a iCal .ics file is OK, I can't find a nice way to send it by email to the attendees without having them to double click on an attachment. Just like Google Calendar and Outlook do, I would like to send emails that will automatically show the buttons Accept | Tentative | Decline upon reception without any other user action involved. If anyone ever had to realize that, I would be more than happy to get your feedback/help or even just relevant guidance. Thanks

    Read the article

  • MFMailComposeViewController configure mimetype for attachment

    - by user749918
    I need some help. I am trying to attach files to mail using, [mail addAttachmentData:attachmentData mimeType:@"image/png" fileName:fileName]; but the problem is that if i need to send a .jpeg image i need to repeat code just for setting mime type to "mimeType:@"image/jpeg". My question is that is there any general mimeType that can attach any kind of file irrespective of .doc,.ppt,.pdf or an audio or video file. is there any general mimeType: for an kind of attachment. Thanks in advance.

    Read the article

  • Read data from an Android USB attachment

    - by Mark
    Is there anyway to read data from an attachment through the USB port on an Android device? In particular, an EKG. Most the work can be done by the hardware of the device to simplify the output to a single number, a voltage reading. If its not possible, what about modifying an accessory that can already communicate with an android device? Thinking of devices that attach to android phones, what about sending the data as an audio signal to be read as the microphone from a headset and then analyzing the audio signal to convert it to a number that can be used to display a value. Any ideas on how to make this work?

    Read the article

  • Why do I have problems downloading some iPhone attachments from Exchange?

    - by CT
    Lately I have been getting an increasing number of complaints regarding users not being able to download attachments synced from Exchange with their iPhone. The iPhones in question are either 3G or 3GS with firmware 3.0 or later. Exchange 2007. The majority of messages come in just fine. Some however display: "This message has not been downloaded from the server" where the email's text normally should be. At the bottom of the email, it states: "This message is only partially downloaded." It has a button labeled "Download remaining 0 bytes." If you click this button, it states that it is loading and then reverts to the same screen. The odd part is that this only affects some emails. Most come in fine with attachments working. I've taken the same email that was not working on my iPhone. Sent it to a gmail account that my iPhone had access to. The message and attachment opened fine. Any ideas of possible causes I could look into? Thanks.

    Read the article

  • Attachment empty/blank when sending mail using phpmailer

    - by chupinette
    Hello! I am using phpmailer class to send email and i am attaching a file to the mail. The email is sent successfully but the attachment which is an sql file is empty which should not be the case. I have tried with an image file, but it seems that every file that i attach is empty. Can anyone help me solve this problem please? $mail = new PHPMailer(); $body = "Reminder"; $mail->IsSMTP(); $mail->Host = "mail.yourdomain.com"; $mail->SMTPDebug = 1; $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Host = "smtp.gmail.com"; $mail->Port = 465; $mail->Username = "[email protected]"; $mail->Password = "abc"; $mail->SetFrom('[email protected]', 'blbla'); $mail->AddReplyTo("[email protected]","First Last"); $mail->Subject = "Your order has been successfully placed" $mail->MsgHTML($body); $mail->AddAddress("[email protected]","xyz"); $mail->AddAttachment("D:\b2\shop3.sql","shop3.sql"); I have tried to display the size of the file before attaching it, and it actually displays the file size. Can anyone help me please?

    Read the article

  • ASP.net attachment then refresh page

    - by Russell
    I am working on a c# project using ASP .net. I have a list of reports with a hyperlink for each, which calls the web server, retrieves a PDF and then returns the PDF for the user to save or open: ASPX page: <table> <tr> <td> <a href="#" onclick="SubmitFormToOpenReport();">Open Report 1</a> <td> </tr> ... </table> ASP.Net: context.Response.Clear(); context.Response.AddHeader("content-disposition", "attachment;filename=report.pdf"); context.Response.Charset = ""; context.Response.ContentType = "application/pdf"; context.Response.BinaryWrite(myReport); context.Response.Flush(); This works as expected, however I would like it to also refresh the page with an updated list. I am having trouble as the single request/response is returning the report. Is there a way to refresh the page as well? While there is a correct response, feel free to include answers which details alternative solutions/ideas for doing this.

    Read the article

  • The process cannot access the file because it is being used by another process

    - by Xenon
    I have an asp.net website and I allready did .Dispose() here is my code below; try { MailMessage newMail = new MailMessage(MailFrom, MailTo, MailSubject, MailMsg); if (MailAttachment != "") { Attachment data = new Attachment(MailAttachment, MediaTypeNames.Application.Octet); newMail.Attachments.Add(data); } newMail.BodyEncoding = System.Text.Encoding.UTF8; newMail.IsBodyHtml = true; SmtpClient client = new SmtpClient("192.168.2.205"); client.Credentials = CredentialCache.DefaultNetworkCredentials; client.Send(newMail); newMail.Attachments.Dispose(); newMail.Dispose(); DeleteAttachment(MailAttachment); lblSuccess.Text = "Basvurunuz alinmistir tesekkürler."; lblSuccess.Visible = true; ClearForm(); } catch (Exception ex) { lblSuccess.Text = ex.Message; //lblSuccess.Text = "Bir sorun olustu bir daha deneyiniz."; lblSuccess.Visible = true; } But i' m getting the same error, it' s running fine in my localhost but in server i' m getting this error. How can i fix it?

    Read the article

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