Search Results

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

Page 12/41 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Attach file to mail using php

    - by ktsixit
    Hi all, I've created a form which contains an upload field file and some other text fields. I'm using php to send the form's data via email and attach the file. This is the code I'm using but it's not working properly. The file is normally attached to the message but the rest of the data is not sent. $body="bla bla bla"; $attachment = $_FILES['cv']['tmp_name']; $attachment_name = $_FILES['cv']['name']; if (is_uploaded_file($attachment)) { $fp = fopen($attachment, "rb"); $data = fread($fp, filesize($attachment)); $data = chunk_split(base64_encode($data)); fclose($fp); } $headers = "From: $email<$email>\n"; $headers .= "Reply-To: <$email>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/related; type=\"multipart/alternative\"; boundary=\"----=MIME_BOUNDRY_main_message\"\n"; $headers .= "X-Sender: $first_name $family_name<$email>\n"; $headers .= "X-Mailer: PHP4\n"; $headers .= "X-Priority: 3\n"; $headers .= "Return-Path: <$email>\n"; $headers .= "This is a multi-part message in MIME format.\n"; $headers .= "------=MIME_BOUNDRY_main_message \n"; $headers .= "Content-Type: multipart/alternative; boundary=\"----=MIME_BOUNDRY_message_parts\"\n"; $message = "------=MIME_BOUNDRY_message_parts\n"; $message .= "Content-Type: text/html; charset=\"utf-8\"\n"; $message .= "Content-Transfer-Encoding: quoted-printable\n"; $message .= "\n"; $message .= "$body\n"; $message .= "\n"; $message .= "------=MIME_BOUNDRY_message_parts--\n"; $message .= "\n"; $message .= "------=MIME_BOUNDRY_main_message\n"; $message .= "Content-Type: application/octet-stream;\n\tname=\"" . $attachment_name . "\"\n"; $message .= "Content-Transfer-Encoding: base64\n"; $message .= "Content-Disposition: attachment;\n\tfilename=\"" . $attachment_name . "\"\n\n"; $message .= $data; //The base64 encoded message $message .= "\n"; $message .= "------=MIME_BOUNDRY_main_message--\n"; $subject = 'bla bla bla'; $to="[email protected]"; mail($to,$subject,$message,$headers); Why isn't the $body data not sent? Can you help me fix it?

    Read the article

  • How to Add a Note to an Email Message in Outlook 2013

    - by Lori Kaufman
    There may be times when you want to add a note to an email message you received. Maybe you need to remember something about the sender or the contents of the email. There are several ways to add a note to an email message. NOTE: You can also create a new task containing an email message you received. This is useful if you need to do something related to the email. The new task will contain all the contents (except attachments) from the email. One method of adding a note to an email message is to flag the message. To do this, right-click on the flag icon in the flag column for the message to which you want to add a note. Select Custom from the popup menu. On the Custom dialog box, you can select a ready-made note from the Flag to drop-down list. You can also type a custom note in the Flag to edit box. Select a Start date and a Due date and setup a reminder, if desired. Click OK. The flag displays above the body of the email message when you double-click on the message to open it in the Message window. You can also put the cursor in the subject line of the message and add text to it, as shown below. When you close the message window, a confirmation dialog box displays asking if you want to save your changes. To save the note you added to the subject line, click Yes. Your note displays as part of the subject line on the message in your list of email messages. You can also add a note to the body of an email message. To do this, you must enable editing of the message. Double-click the message to open the Message window. Click Actions in the Move section of the Message tab and select Edit Message from the drop-down menu. Click in the body of the message and type your note. When you close the Message window, a confirmation dialog box displays asking if you want to save your changes. Click Yes to save you note in the body of the email. You can see the note you added if it is visible as part of the first line of the body displayed in the list of email messages. Use the Notes section of Outlook to create a separate note you can attach to an email message. To do this, click the … button on the Navigation Bar and select Notes from the popup menu. Click New Note on the Home tab of the Notes window (or press Ctrl + N) to create a note. Enter the text for your note in the small note window that displays and click the X button to close the note, saving it. To attach the note to the email message, make sure the Mail section of Outlook is active. Double-click on the message onto which you want to attach the note. Leaving the Message window open, go back to the main Outlook window and select Notes from the Navigation Bar, as mentioned above. Drag the note you created to the message window. The note is added to the message as an attachment. When you close the Message window, a confirmation dialog box displays asking if you want to save your changes. To save the message with your note added as an attachment, click Yes. A paperclip icon is added to the message in the list of email messages, indicating there is an attachment in the message. When you add a note to an email message as an attachment using the Notes section of Outlook, you don’t have to keep the original note. The note is now saved with the message, and can be deleted from the Notes section.     

    Read the article

  • Axis2 attachments are vanishing in the response

    - by Shamik
    I am using axis2 to come up with a basic web service which will get the file name as parameter and produces a response SOAP packet which will have the file attached along with the SOAP. Here is the way I am creating the service code (its simple and inspired by Axis2 sample code) public String getFile(String name) throws IOException { MessageContext msgCtx = MessageContext.getCurrentMessageContext(); File file = new File (name); System.out.println("File = " + name); System.out.println("File exists = " + file.exists()); FileDataSource fileDataSource = new FileDataSource(file); System.out.println("fileDataSource = " + fileDataSource); DataHandler dataHandler = new DataHandler(fileDataSource); System.out.println("DataHandler = " + dataHandler); String attachmentID = msgCtx.addAttachment(dataHandler); System.out.println("attachment ID = " + attachmentID); return attachmentID; } Now The client side code - MessageContext response = mepClient .getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); SOAPBody body = response.getEnvelope().getBody(); OMElement element = body.getFirstElement().getFirstChildWithName( new QName("http://service.soapwithattachments.sample","return")); String attachementId = element.getText(); System.out.println("attachment id is " + attachementId); Attachments attachment = response.getAttachmentMap(); DataHandler dataHandler = attachment.getDataHandler(attachementId); Problem is that dataHandler is always null. Though I think at the server side, the file was read and attached along with the SOAP packet. Am I doing something wrong ? EDIT : I have put <parameter name="enableSwA" locked="false">true</parameter> in the axis2.xml file.

    Read the article

  • Javascript not able to read data generated by ajax script

    - by user1371033
    I have a situation in which my Jquery Ajax script generates HTML table. And another script is meant to filter the table column by providing a dropdown comprising of unique values in that particular column. If i have static content in html page the filter script works fine. But is not able to read table content when it is generated via Ajax that is during runtime. Any idea what could be the reason. I also tried to align script in order. My Ajax script is here:- $(document).ready(function() { $("#getResults").click(function(){ bug = $("#bug").val(); priority = $("#priority").val(); component = $("#component").val(); fixVersion = $("#fixVersion").val(); dateType = $("#dateType").val(); fromDate = $("#dp2").val(); toDate = $("#dp3").val(); $("#query").empty(); $("tbody").empty(); $.post("getRefineSearchResultsPath", {bug:bug,priority:priority,component:component, fixVersion:fixVersion,dateType:dateType,fromDate:fromDate,toDate:toDate }, function(data) { // setting value for csv report button //clear the value attribute for button first $("#query_csv").removeAttr("value"); //setting new value to "value" attribute of the csv button $("#query_csv").attr("value", function(){ return $(data).find("query").text(); }); $("#query").append("<p class='text-success'>Query<legend></legend><small>" +$(data).find("query").text() +"</small></p>"); var count = 1; $(data).find("issue").each(function(){ var $issue = $(this); var value = "<tr>"; value += "<td>" +count +"</td>"; value += "<td>" +$issue.find('issueKey').text() +"</td>"; value += "<td>" +$issue.find('type').text() +"</td>"; value += "<td><div id='list' class='summary'>" +$issue.find('summary').text() +"</div></td>"; value += "<td><div id='list' class='mousescroll'>" +$issue.find('description').text() +"</div></td>"; value += "<td>" +$issue.find('priority').text() +"</td>"; value += "<td>" +$issue.find('component').text() +"</td>"; value += "<td>" +$issue.find('status').text() +"</td>"; value += "<td>" +$issue.find('fixVersion').text() +"</td>"; value += "<td>" +$issue.find('resolution').text() +"</td>"; value += "<td>" +$issue.find('created').text() +"</td>"; value += "<td>" +$issue.find('updated').text() +"</td>"; value += "<td>" +$issue.find('os').text() +"</td>"; value += "<td>" +$issue.find('frequency').text() +"</td>"; value += "<td>"; var number_of_attachement = $issue.find('attachment').size(); if(number_of_attachement > 0){ value += "<div id='list' class='attachment'>"; value += "<ul class='unstyled'>"; $issue.find('attachment').each(function(){ var $attachment = $(this); value += "<li>"; value += "<a href='#' onclick='document.f1.attachmentName.value='" +$attachment.find('attachmentName').text(); value += "';document.f1.issueKey.value='"+$attachment.find('attachmentissueKey').text(); value += "';document.f1.digest.value='"+$attachment.find('attachmentdigest').text(); value += "';document.f1.submit();'>"+$attachment.find('attachmentName').text(); value += "</a>"; value += "</li>"; value += "<br>"; }); value +="</ul>"; value +="</div>"; } value += "</td>"; value += "</tr>"; $("tbody").append(value); count++; }); }); }); }); And my script to filter table is here, I got this script from this link http://www.javascripttoolbox.com/lib/table/ My JSP page is here:- <html> <body> <table class="table table-bordered table-condensed table-hover example sort01 table-autosort:0 table-autofilter table-autopage:10 table-page-number:t1page table-page-count:t1pages table-filtered-rowcount:t1filtercount table-rowcount:t1allcount"> <thead > <tr> <th class="table-sortable:numeric" Style="width:3%;">No.</th> <th class="table-sortable:default" Style="width:5.5%;">Issue Key <br> </th> <th>Type</th> <th Style="text-align: center;">Summary</th> <th Style="text-align: center;">Description</th> <th class="table-filterable table-sortable:default" id ="priorityColumn" Style="width:5%">Priority</th> <th class="table-filterable table-sortable:default" >Component</th> <th class="table-filterable table-sortable:default" Style="width:5%">Status</th> <th class="table-filterable table-sortable:default">Fix Version</th> <th class="table-filterable table-sortable:default" Style="width:6%">Resolution</th> <th>Created</th> <th>Updated</th> <th>OS</th> <th>Frequency</th> <th>Attachments</th> </tr> </thead> <tbody> </tbody> <tfoot> <tr> <td class="table-page:previous" style="cursor:pointer;"><img src="table/icons/previous.gif" alt="Previous"><small>Prev</small></td> <td colspan="13" style="text-align:center;">Page <span id="t1page"></span>&nbsp;of <span id="t1pages"></span></td> <td class="table-page:next" style="cursor:pointer;">Next <img src="table/icons/next.gif" alt="Previous"></td> </tr> <tr Style="background-color: #dddddd"> <td colspan="15"><span id="t1filtercount"></span>&nbsp;of <span id="t1allcount"></span>&nbsp;rows match filter(s)</td> </tr> <tr class="text-success"> <td colspan="15">Total Results : ${count}</td> </tr> </tfoot> </table> </body> </html>

    Read the article

  • PHP Facebook Cronjob with offline access

    - by Mohamed Salem
    1:the code to greet the user, ask for his permission and store his session data so that we can use a cronjob with his session data afterwards. <?php $db_server = "localhost"; $db_username = "username"; $db_password = "password"; $db_name = "databasename"; #go to line 85, the script actually starts there mysql_connect($db_server,$db_username,$db_password); mysql_select_db($db_name); #you have to create a database to store session values. #if you do not know what columns there should be look at line 76 to see column names. #make them all varchars # Now lets load the FB GRAPH API require './facebook.php'; // Create our Application instance. global $facebook; $facebook = new Facebook(array( 'appId' => '121036530138', 'secret' => '9bbec378147064', 'cookie' => false,)); # Lets set up the permissions we need and set the login url in case we need it. $par['req_perms'] = "friends_about_me,friends_education_history,friends_likes, friends_interests,friends_location,friends_religion_politics, friends_work_history,publish_stream,friends_activities, friends_events, friends_hometown,friends_location ,user_interests,user_likes,user_events, user_about_me,user_status,user_work_history,read_requests, read_stream,offline_access,user_religion_politics,email,user_groups"; $loginUrl = $facebook->getLoginUrl($par); function save_session($session){ global $facebook; # OK lets go to the database and see if we have a session stored $sid=mysql_query("Select access_token from facebook_user WHERE uid =".$session['uid']); $session_id=mysql_fetch_row($sid); if (is_array($session_id)) { # We have a stored session, but is it valid? echo " We have a session, but is it valid?"; try { $attachment = array('access_token' => $session_id[0]); $ret_code=$facebook->api('/me', 'GET', $attachment); } catch (Exception $e) { # We don't have a good session so echo " our old session is not valid, let's delete saved invalid session data "; $res = mysql_query("delete from facebook_user WHERE uid =".$session['uid']); #save new good session #to see what is our session data: print_r($session); if (is_array($session)) { $sql="insert into facebook_user (session_key,uid,expires,secret,access_token,sig) VALUES ('".$session['session_key']."','".$session['uid']."','". $session['expires']."','". $session['secret'] ."','" . $session['access_token']."','". $session['sig']."');"; $res = mysql_query($sql); return $session['access_token']; } # this should never ever happen echo " Something is terribly wrong: Our old session was bad, and now we cannot get the new session"; return; } echo " Our old stored session is valid "; return $session_id[0]; } else { echo " no stored session, this means the user never subscribed to our application before. "; # let's store the session $session = $facebook->getSession(); if (is_array($session)) { # Yes we have a session! so lets store it! $sql="insert into facebook_user (session_key,uid,expires,secret,access_token,sig) VALUES ('".$session['session_key']."','".$session['uid']."','". $session['expires']."','". $session['secret'] ."','". $session['access_token']."','". $session['sig']."');"; $res = mysql_query($sql); return $session['access_token']; } } } #this is the first meaningful line of this script. $session = $facebook->getSession(); # Is the user already subscribed to our application? if ( is_null($session) ) { # no he is not #send him to permissions page header( "Location: $loginUrl" ); } else { #yes, he is already subscribed, or subscribed just now #in case he just subscribed now, save his session information $access_token=save_session($session); echo " everything is ok"; # write your code here to do something afterwards } ?> error Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/28/9687528/html/ss/src/indexx.php:1) in /home/content/28/9687528/html/ss/src/facebook.php on line 49 Fatal error: Call to undefined method Facebook::getSession() in /home/content/28/9687528/html/ss/src/indexx.php on line 86 2:A cronjob template that reads the stored session of a user from database, uses his session data to work on his behalf, like reading status posts or publishing posts etc. <?php $db_server = "localhost"; $db_username = "username"; $db_password = "pass"; $db_name = "database"; # Lets connect to the Database and set up the table $link = mysql_connect($db_server,$db_username,$db_password); mysql_select_db($db_name); # Now lets load the FB GRAPH API require './facebook.php'; // Create our Application instance. global $facebook; $facebook = new Facebook(array( 'appId' => 'appid', 'secret' => 'secret', 'cookie' => false, )); function get_check_session($uidCheck){ global $facebook; # This function basically checks for a stored session and if we have one it returns it # OK lets go to the database and see if we have a session stored $sid=mysql_query("Select access_token from facebook_user WHERE uid =".$uidCheck); $session_id=mysql_fetch_row($sid); if (is_array($session_id)) { # We have a session # but, is it valid? try { $attachment = array('access_token' => $session_id[0],); $ret_code=$facebook->api('/me', 'GET', $attachment); } catch (Exception $e) { # We don't have a good session so echo " User ".$uidCheck." removed the application, or there is some other access problem. "; # let's delete stored data $res = mysql_query("delete from facebook_user where WHERE uid =".$uidCheck); return; } return $session_id[0]; } else { # "no stored session"; echo " error:newsFeedcrontab.php No stored sessions. This should not have happened "; } } # get all users that have given us offline access $users = getUsers(); foreach($users as $user){ # now for each user, check if they are still subscribed to our application echo " Checking user".$user; $access_token=get_check_session($user); # If we've not got an access_token we actually need to login. # but in the crontab, we just log the error, there is no way we can find the user to give us permission here. if ( is_null($access_token) ) { echo " error: newsFeedcrontab.php There is no access token for the user ".$user." "; } else { #we are going to read the newsfeed of user. There are user's friends' posts in this newsfeed try{ $attachment = array('access_token' => $access_token); $result=$facebook->api('/me/home', 'GET', $attachment); }catch(Exception $e){ echo " error: newsfeedcrontab.php, cannot get feed of ".$user.$e; } #do something with the result here #but what does the result look like? #go to http://developers.facebook.com/docs/reference/api/user/ and click on the "home" link under connections #we can also read the home of user. Home is the wall of the user who has given us offline access. try{ $attachment = array('access_token' => $access_token); $result=$facebook->api('/me/feed', 'GET', $attachment); }catch(Exception $e){ echo " error: newsfeedcrontab.php, cannot get wall of ".$user.$e; } #do something with the result here # #but what does the result look like? #go to http://developers.facebook.com/docs/reference/api/user/ and click on the "feed" link under connections } } function getUsers(){ $sql = "SELECT distinct(uid) from facebook_user Where 1"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)){ $rows [] = $row['uid']; } print_r($rows); return $rows; } mysql_close($link); ?> error Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/28/9687528/html/ss/src/cron.php:1) in /home/content/28/9687528/html/ss/src/facebook.php on line 49 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/28/9687528/html/ss/src/cron.php on line 110 Warning: Invalid argument supplied for foreach() in /home/content/28/9687528/html/ss/src/cron.php on line 64

    Read the article

  • Facebook and rtl

    - by Benni
    Is there any good way to display rtl based languages (in this case Hebrew) in facbook? As soon as I include a page in rtl formating facebook it gives displays it ltr and usually aligned right. What definetly works is when I use dir="rtl" in the code. But then the fbml tag come out the other way round. And when I try to publish a stream it is not displayed correctly. Is there any support for rtl in facebook? Here is the code: $message = "?????? ??? ?? ???? - ??? ??? ????? .\""; $attachment = array( 'name' => '???? ?? ???? - ?? ??? ??? ?????', 'href' => 'http://apps.facebook.com/igodtest/', 'caption' => '{*actor*} took the Quiz!', 'description' => 'Take the Quiz yourself!', 'media' => array(array('type' => 'image', 'src' => '', 'href' => ''))); $action_links = array(array('text' => '', 'href' => '')); $attachment = json_encode($attachment); $action_links = json_encode($action_links); $facebook->api_client->stream_publish($message,$attachment,$action_links);

    Read the article

  • better way of showing File Upload Errors?

    - by coure06
    Model: public class EmailAttachment { public string FileName { get; set; } public string FileType { get; set; } public int FileSize { get; set; } public Stream FileData { get; set; } } public class ContactEmail: IDataErrorInfo { public string Name { get; set; } public string Email { get; set; } public string Message { get; set; } public EmailAttachment Attachment { get; set; } public string Error { get { return null; } } public string this[string propName] { get { if (propName == "Name" && String.IsNullOrEmpty(Name)) return "Please Enter your Name"; if (propName == "Email"){ if(String.IsNullOrEmpty(Email)) return "Please Provide an Email Address"; else if(!Regex.IsMatch(Email, ".+\\@.+\\..+")) return "Please Enter a valid email Address"; } if (propName == "Message" && String.IsNullOrEmpty(Message)) return "Please Enter your Message"; return null; } }} And my controller file [AcceptVerbs(HttpVerbs.Post)] public ActionResult Con(ContactEmail ce, HttpPostedFileBase file) { return View(); } Now the Problem From the form i am getting Name,Email, Message and uploaded file. I can get validation errors automatically for Name,Email,Message using public string this[string propName]. How can i show validation errors if Attachment.FileSize 10000? If i write its code in public string this[string propName] i alwasy getting Attachment null. How can i fill Attachment Object of ContactEmail so that i can manage all errors on same place?

    Read the article

  • Why can't I pass a form field of type file to a CFFUNCTION using structure syntax?

    - by Eric Belair
    I'm trying to pass a form field of type "file" to a CFFUNCTION. The argument type is "any". Here is the syntax I am trying to use (pseudocode): <cfloop from="1" to="5" index="i"> <cfset fieldname = "attachment" & i /> <cfinvoke component="myComponent" method="attachFile"> <cfinvokeargument name="attachment" value="#FORM[fieldname]#" /> </cfinvoke> </cfloop> The loop is being done because there are five form fields named "attachment1", "attachment2", et al. This throws an exception in the function: coldfusion.tagext.io.FileTag$FormFileNotFoundException: The form field C:\ColdFusion8\...\neotmp25080.tmp did not contain a file. However, this syntax DOES work: <cfloop from="1" to="5" index="i"> <cfinvoke component="myComponent" method="attachFile"> <cfinvokeargument name="attachment" value="FORM.attachment#i#" /> </cfinvoke> </cfloop> I don't like writing code like that in the second example. It just seems like bad practice to me. So, can anyone tell me how to use structure syntax to properly pass a file type form field to a CFFUNCTION??

    Read the article

  • Calendar invites go out OK, acknowldegements don't come back, using exchange server

    - by Robert Olsen
    When I send an invite it goew out OK, however, I don't get an acceptances acknowledgement back. Both I and the person who got the invite are on exchange. When the person who got the invite sends an email responce there is a .ics mini-attachment. When I click on the .ics attachment it doesn't put anything in the calander, it just points to the contact for the person I sent the inviter to.

    Read the article

  • Handle existing instance of root activity when launching root activity again from intent filter

    - by Robert
    Hi, I'm having difficulties handling multiple instances of my root (main) activity for my application. My app in question has an intent filter in place to launch my application when opening an email attatchment from the "Email" app. My problem is if I launch my application first through the the android applications screen and then launch my application via opening the Email attachment it creates two instances of my root activity. steps: Launch root activity A, press home Open email attachment, intent filter triggers launches root activity A Is it possible when opening the Email attachment that when the OS tries to launch my application it detects there is already an instance of it running and use that or remove/clear that instance?

    Read the article

  • Play video in UIWebView from NSData

    - by Papagalli
    Hello there, Does anybody know how to play a video in a UIVebView ? The video comes from the iphone library, when I pick it, I store it in core data as binary data. If i use the local url of the video it's working fine, the problem I have is that the this url refers to a folder named "tmp", and I don't know the lifetime of it. If I can get the real url of the video file it will be ok. //attachment is the core data object containing the data NSURL *url = [NSURL URLWithString:attachment.path]; [self.webView loadRequest:[NSURLRequest requestWithURL:url]]; I tried a solution that doesn't work: (i tried MIMETypes : "video/quicktime" and "video/mp4") [self.webView loadData:attachment.data MIMEType:@"video/mov" textEncodingName:nil baseURL:nil]; I think the second solution is the closest, and the problem comes from the MIMEType. Thanks by advance if anybody has a solution for this :)

    Read the article

  • Can I use ruby rest-client to POST a binary file to an http API?

    - by Angela
    I have been using rest-client in ruby in post XML to a third-party API. I need to be able to include a binary image that's uploaded. How do I do that? Uploading Attachments Both letters and postcards will, in most cases, require the attachment of documents. Those attachments might be PDFs in the case of letters or images in the case of postcards. To uploading an attachment, submit a POST to: http://www.postful.com/service/upload Be sure to include the Content-Type and Content-Length headers and the attachment itself as the body of the request. POST /upload HTTP/1.0 Content-Type: application/octet-stream Content-Length: 301456 ... file content here ... If the upload is successful, you will receive a response like the following: 290797321.waltershandy.2

    Read the article

  • C# how to correctly dispose of an SmtpClient?

    - by JL
    VS 2010 code analysis reports the following: Warning 4 CA2000 : Microsoft.Reliability : In method 'Mailer.SendMessage()', object 'client' is not disposed along all exception paths. Call System.IDisposable.Dispose on object 'client' before all references to it are out of scope. My code is : public void SendMessage() { SmtpClient client = new SmtpClient(); client.Send(Message); client.Dispose(); DisposeAttachments(); } How should I correctly dispose of client? Update: to answer Jons question, here is the dispose attachments functionality: private void DisposeAttachments() { foreach (Attachment attachment in Message.Attachments) { attachment.Dispose(); } Message.Attachments.Dispose(); Message = null; }

    Read the article

  • android- How to access and update HTML file

    - by naresh
    In my application I want to use html file for attaching to the email client. So I want to access and update this html file at run time after that i added as an attachment. Is it possible?If yes, Please can anyone help me. Here i tried like first i created one html file in the assets folder after that i added it as an attachment But now i want to update it as at run time. I tried but i am not getting. code final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/html"); //attachment Uri uri = Uri.fromFile(new File("file:///android_asset/YFG_Login.html")); emailIntent.putExtra(android.content.Intent.EXTRA_STREAM, uri); startActivity(Intent.createChooser(emailIntent, "Email:")); thanks, Naresh

    Read the article

  • Grid View To Excel

    - by rahulchandran
    Hi I am trying to convert the contents of a grid View to an excel file and I am doing it using this code string attachment = "attachment; filename= " + FileName; Response.ClearContent(); Response.AddHeader("content-disposition", attachment); Response.ContentType = "application/excel"; StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); gv.RenderControl(htw); Response.Write(sw.ToString()); Response.End(); The problem is I am getting some sort of html in an excel style format , theres java script in the page links etc what I want is to turn the results of my query into a comma seperated file Is that do-able for free or do I have to run the query myself get the data and write out a csv stream Thanks

    Read the article

  • Getting publish_stream extended permission from the user

    - by José Joel.
    I was ussing Facbook connect in my iPhone app, but in december the posts stopped working. After some research I found that i'm supossed to use stream.publish, something like: NSString *att = @"{\"bob\":\"i\'m happy\",\"caption\": \"User rated the internet 5 stars\", \"description\": \"a giant cat\"}"; NSDictionary *attachment = [NSDictionary dictionaryWithObject:att forKey:@"attachment"]; [[FBRequest requestWithDelegate:self] call:@"facebook.stream.publish" params:attachment]; Which i think it's correct, but the posts still don't work. Someone told me that i need to get publish_stream extended permission from the user, but i dont know how to do that.

    Read the article

  • adding Buttons to Columns in Datagride view

    - by kasunmit
    HiHi, I wrote C# application for import unread e-mails from outlook 2007, I could import sender name, sender mail address,subject and body to data grid view as following foreach (Microsoft.Office.Interop.Outlook._MailItem mailItem in fldEmails.Items) { if (mailItem.UnRead) { UnreadEmails mail = new UnreadEmails(); // mail.AttachmentContent = (mailItem.UnRead == false) ? string.Empty : mailItem.Attachments.Session.OpenSharedItem; foreach (Microsoft.Office.Interop.Outlook.Attachment Atmt in mailItem.Attachments) { mail.AttachmentContent = (mailItem.UnRead == false) ? string.Empty : Atmt.DisplayName; } emails.Add(mail); } } UnreadEmails is a separte class. but couldn't find a way to import attachments (word pdf ppt excel) because i need it for my filter pls help me about it but i could import inly name of the attachment but i need to import attachment content (word, pdf , ppt .. atc. ) to this data grid pls tell how i can do it ... with the code

    Read the article

  • Ho do I extract a Outlook message nested into another using Apache POI - HSMF?

    - by Jan
    I am using Apache POI - HSMF to extract attachments from Outlooks msg-files. It works fine except for nested messages. If an msg is attached to another msg I am able to get the files. If a message is nested I get the information but I need the file. MAPIMessage msg = new MAPIMessage(fileName) for(AttachmentChunks attachment : msg.getAttachmentFiles()) { if(attachment.attachmentDirectory!=null){ MAPIMessage nestedMsg attachment.attachmentDirectory.getAsEmbededMessage(); // now save nestedMsg as a msg-file } } Is it possible to save the nested message file as a regular msg-file?

    Read the article

  • TFS work items tips

    - by Michael Freidgeim
    We started to use TFS to track requests using Work items. 1. Telerik's  TFS Work Item Manager (beta version for TFS 2010 is available) that could be interesting to use instead of standard VS2010, especially for someone who doesn’t want to have VS installed on their machine.(thanks to dimarzionist who pointed to the tool).See also TFS Project Dashboa 2.Visual Studio TFS work item attachments Tab I've found that Outlook emails can be dropped to TFS work item attachments. Just open TFS work item attachment tab and drag and drop Outlook email to it. Also you can copy any selected text and paste it to TFS work item attachments tab. The text will be saved as an attachment file.

    Read the article

  • Kooboo CMS 2.1.1.0 released

    New features Add new API RssUrl to generate RSS link, this is an extension to UrlHelper. Add possibility to index and search attachment content on Lucene full text search engine, some of the attachment requires ifilter component from Microsoft. Supported file attachments include: .docx, .docm, .pptx, .pptm, .xlsx, .xlsm, .xlsb, .zip, .one, .vdx, .vsd, .vss, .vst, .vdx, .vsx, and .vtx.Please download and install ifilter from: http://www.microsoft.com/downloads/details.aspx?FamilyId=60C92A37-719C-4077-B5C6-CAC34F4227CC&displaylang=enFor...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Sending Adobe PDF attachments from Adobe Reader (in Outlook 2003) takes too long

    - by White Island
    I have a customer who is using Outlook 2003 (Microsoft Online Services) and Adobe reader 9+. When they send a PDF from Adobe reader to Outlook (via the Send as attachment to e-mail feature in Adobe), it freezes for 30 seconds to 5 minutes before the new e-mail pops up with the PDF attachment. I'm pretty sure the issue is on the Outlook side of things, as I've tried Adobe reader 8 and Foxit Reader with the same results (Windows XP/7 doesn't seem to make a difference, either). I tried Outlook in safe mode on the first (Win7) machine I was working on, and the e-mail attachment worked a lot faster, but when I tried to replicate the results on another machine, one wouldn't go into safe mode, the other didn't seem to show a difference. In an effort to fix the problem in Outlook normal mode, I tried disabling all add-ins, Com add-in (Office Communicator is the only one), reading pane, Word 2003 as e-mail editor... but none of these seemed to address the issue. Does anyone have any other ideas? I need to get this resolved as soon as possible, and it doesn't seem practical to make them run in safe mode. :P

    Read the article

  • Sending Adobe PDF attachments from Adobe Reader (in Outlook 2003) takes too long

    - by White Island
    I have a customer who is using Outlook 2003 (Microsoft Online Services) and Adobe reader 9+. When they send a PDF from Adobe reader to Outlook (via the Send as attachment to e-mail feature in Adobe), it freezes for 30 seconds to 5 minutes before the new e-mail pops up with the PDF attachment. I'm pretty sure the issue is on the Outlook side of things, as I've tried Adobe reader 8 and Foxit Reader with the same results (Windows XP/7 doesn't seem to make a difference, either). I tried Outlook in safe mode on the first (Win7) machine I was working on, and the e-mail attachment worked a lot faster, but when I tried to replicate the results on another machine, one wouldn't go into safe mode, the other didn't seem to show a difference. In an effort to fix the problem in Outlook normal mode, I tried disabling all add-ins, Com add-in (Office Communicator is the only one), reading pane, Word 2003 as e-mail editor... but none of these seemed to address the issue. Does anyone have any other ideas? I need to get this resolved as soon as possible, and it doesn't seem practical to make them run in safe mode. :P

    Read the article

  • Excel - "send to Mail recipient" creates 2nd copy of EMail in Inbox

    - by ssollinger
    When sending Excel sheets using the menu item "File" - "Sent To" - "Mail recipient (as attachment)" I get additional copies of the email in the Inbox. When I press "send" then I get 2 copies of the email in Outlook - as expected one in the Outbox (which moves into the Sent folder as soon it is sent off) and an additional one in the Inbox. How do I stop the copy message appearing in the Inbox? System: Excel 2000, Outlook 2000, Windows XP. Antivirus is AVG Free 2011. I know this is a very old system, but it is not my PC and there isn't any chance to get it replaced in the near future yet. SOme further details: The copy in the inbox appears at the same time as the normal copy goes into the Outbox (i.e. as soon I press send). It doesn't contain anything in the From field (i.e. there is no sender, just the recipient of the mail). It has a different icon in Outlook to the other emails - the icon is the one for "saved or unsent message". I tried it with a few different spreadsheets and it happens with all of them. It happens with every recipient, and it only happens if sending from within Excel (i.e. using the Send to menu item). I can delete the attachment before sending and it will still create a copy. If I create a new message in Outlook and then add the Excel document as attachment then I don't get the copy of the message in the inbox, it only happens when using the send to item in Excel. It only started doing this recently. Around that time the Antivirus (AVG Free) was upgraded to the latest version (from the previous version - 2010? - to version 2011), but this might not be related. I thought I know Excel really well but have never seen this happening before, and I can't find any setting in Excel or Outlook that is causing this. Any ideas?

    Read the article

  • i had problem in adding the additional content in my pdf

    - by Ayyappan.Anbalagan
    I am converting my data set into a pdf document.My data set contains the product bill details.So,at the top of the pdf i need to added some more content like "my company name & address customer name, date of bill,bill no" Below code i am using to convert into pdf. public static void Exportdata(DataTable dataTable, HttpResponse Response, int val) { //String filename = String.Concat(name, "-", DateTime.Today.Day.ToString(), "/", DateTime.Today.Month.ToString(), "/", DateTime.Today.Year.ToString(), ".pdf"); Document pdfDoc = new Document(PageSize.A4, 30, 30, 40, 25); System.IO.MemoryStream mStream = new System.IO.MemoryStream(); PdfWriter writer = PdfWriter.GetInstance(pdfDoc, mStream); //int cols = 0; //int rows = 0; int cols = dataTable.Columns.Count; int rows = dataTable.Rows.Count; pdfDoc.Open(); iTextSharp.text.Table pdfTable = new iTextSharp.text.Table(cols, rows); pdfTable.BorderWidth = 1; pdfTable.Width = 100; pdfTable.Padding = 1; pdfTable.Spacing = 1; //creating table headers for (int i = 0; i < cols; i++) { Cell cellCols = new Cell(); Font ColFont = FontFactory.GetFont(FontFactory.HELVETICA, 8, Font.BOLD); Chunk chunkCols = new Chunk(dataTable.Columns[i].ColumnName, ColFont); cellCols.Add(chunkCols); pdfTable.AddCell(cellCols); } //creating table data (actual result) for (int k = 0; k < rows; k++) { for (int j = 0; j < cols; j++) { Cell cellRows = new Cell(); Font RowFont = FontFactory.GetFont(FontFactory.HELVETICA, 6); Chunk chunkRows = new Chunk(dataTable.Rows[k][j].ToString(), RowFont); cellRows.Add(chunkRows); pdfTable.AddCell(cellRows); } } pdfDoc.Add(pdfTable); pdfDoc.Close(); Response.ContentType = "application/octet-stream"; if (val == 1) { Response.AddHeader("Content-Disposition", "attachment; filename=Users.pdf"); } else if (val == 2) { Response.AddHeader("Content-Disposition", "attachment; filename=Customers.pdf"); } else if (val == 3) { Response.AddHeader("Content-Disposition", "attachment; filename=Materials.pdf"); } else { Response.AddHeader("Content-Disposition", "attachment; filename=Reports.pdf"); } Response.Clear(); Response.BinaryWrite(mStream.ToArray()); //Response.Write(mStream.ToString()); HttpContext.Current.ApplicationInstance.CompleteRequest(); Response.End(); }

    Read the article

  • i had problem in adding the additional content in my pdf...using asp.net c#

    - by Ayyappan.Anbalagan
    I am converting my data set into a pdf document.My data set contains the product bill details.So,at the top of the pdf i need to added some more content like "my company name & address customer name, date of bill,bill no" Below code i am using to convert into pdf. public static void Exportdata(DataTable dataTable, HttpResponse Response, int val) { //String filename = String.Concat(name, "-", DateTime.Today.Day.ToString(), "/", DateTime.Today.Month.ToString(), "/", DateTime.Today.Year.ToString(), ".pdf"); Document pdfDoc = new Document(PageSize.A4, 30, 30, 40, 25); System.IO.MemoryStream mStream = new System.IO.MemoryStream(); PdfWriter writer = PdfWriter.GetInstance(pdfDoc, mStream); //int cols = 0; //int rows = 0; int cols = dataTable.Columns.Count; int rows = dataTable.Rows.Count; pdfDoc.Open(); iTextSharp.text.Table pdfTable = new iTextSharp.text.Table(cols, rows); pdfTable.BorderWidth = 1; pdfTable.Width = 100; pdfTable.Padding = 1; pdfTable.Spacing = 1; //creating table headers for (int i = 0; i < cols; i++) { Cell cellCols = new Cell(); Font ColFont = FontFactory.GetFont(FontFactory.HELVETICA, 8, Font.BOLD); Chunk chunkCols = new Chunk(dataTable.Columns[i].ColumnName, ColFont); cellCols.Add(chunkCols); pdfTable.AddCell(cellCols); } //creating table data (actual result) for (int k = 0; k < rows; k++) { for (int j = 0; j < cols; j++) { Cell cellRows = new Cell(); Font RowFont = FontFactory.GetFont(FontFactory.HELVETICA, 6); Chunk chunkRows = new Chunk(dataTable.Rows[k][j].ToString(), RowFont); cellRows.Add(chunkRows); pdfTable.AddCell(cellRows); } } pdfDoc.Add(pdfTable); pdfDoc.Close(); Response.ContentType = "application/octet-stream"; if (val == 1) { Response.AddHeader("Content-Disposition", "attachment; filename=Users.pdf"); } else if (val == 2) { Response.AddHeader("Content-Disposition", "attachment; filename=Customers.pdf"); } else if (val == 3) { Response.AddHeader("Content-Disposition", "attachment; filename=Materials.pdf"); } else { Response.AddHeader("Content-Disposition", "attachment; filename=Reports.pdf"); } Response.Clear(); Response.BinaryWrite(mStream.ToArray()); //Response.Write(mStream.ToString()); HttpContext.Current.ApplicationInstance.CompleteRequest(); Response.End(); }

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >