Search Results

Search found 6810 results on 273 pages for 'outgoing mail'.

Page 154/273 | < Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >

  • Swift Mailer Error

    - by Selom
    Hi, Im using the following code to send a message: try { require_once "lib/Swift.php"; require_once "lib/Swift/Connection/SMTP.php"; $smtp =& new Swift_Connection_SMTP("mail.somedomain.net", 587); $smtp->setUsername("username"); $smtp->setpassword("password"); $swift =& new Swift($smtp); //Create the sender from the details we've been given $sender =& new Swift_Address($email, $name); $message =& new Swift_Message("message title"); $message->attach(new Swift_Message_Part("Hello")); //Try sending the email $sent = $swift->send($message, "$myEmail", $sender); //Disconnect from SMTP, we're done $swift->disconnect(); if($sent) { print 'sent'; } else { print 'not sent'; } } catch (Exception $e) { echo"$e"; } The issue is that it is working fine on my local server (which my xampp server) but not working when the file is uploaded on the real server. It throwing this error: 'The SMTP connection failed to start [mail.somedomain.net:587]: fsockopen returned Error Number 110 and Error String 'Connection timed out'' Please what should I do to correct this error. Thanks for reading

    Read the article

  • sermyadmin 2.01

    - by lepricon123
    I am able to install sermyadmin 2.0.1 and got everything working. Only user registration is not working. When I register a user the entry goe sin DB etc find but the email is not send to the user. We are using our own smtp server with no authentication. And I am sure there is nothing wrong with the smtp server. I can see that it has received a request from sermyadmin but in the logs Is ee that the FROM adddress is missing. So it is throwing 553 5.1.8 Domain of sender address does not exist. The domain does exist. Here is my resources.xml with all the valid entries. Since I don;t need the smtp authentication which the server is not using, i removed that. <beans xmlns="www.springframework.org/schema/beans" xmlns:xsi="www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" www.springframework.org/schema/beans www.springframework.org/schema/beans/spr...ns-2.0.xsd"> <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="10.100.22.365" /> </bean> <bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage"> <property name="from" value="[email protected]" /> </bean> </beans>

    Read the article

  • Problem with ar_mailer

    - by Roberto
    Hi guys, I'm running a strange problem sending emails. Basicly I'm getting this exception: ArgumentError (wrong number of arguments (1 for 0)): /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `new' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `create' /usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:92:in `perform_delivery_activerecord' /usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:91:in `each' /usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:91:in `perform_delivery_activerecord' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:508:in `__send__' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:508:in `deliver!' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:383:in `method_missing' /app/controllers/web_reservations_controller.rb:29:in `test_email' In my web_reservations_controller I have a simply method calling TestMailer.deliver_send_email And my TesMailer is something like: class TestMailer < ActionMailer::ARMailer def send_email @recipients = "[email protected]" @from = "[email protected]" @subject = "TEST MAIL SUBJECT" @body = "<br>TEST MAIL MESSAGE" @content_type = "text/html" end end Do you have any idea? Thanks! Roberto

    Read the article

  • Amazon ELB CNAME record not working

    - by BarthQuay
    Hi there, I have set up my EC2 infrastructure behind an ELB instance and by using the ELBs DNS name everything works as expected. Now i wanted to forward a subdomain of my main project domain to the ELBs DNS Name with a CNAME entry. I did this about 12 hours ago and it doesnt seem to work, and i dont know why. The subdomain just cant be resolved. This is the DNS entry which was processed from my DNS provider without errors yesterday: @ IN A 111.111.111.111 localhost IN A 127.0.0.1 mail IN A 111.111.111.111 www IN A 111.111.111.111 ftp IN CNAME www beta IN CNAME myelbnamehere.eu-west-1.elb.amazonaws.com imap IN CNAME www loopback IN CNAME localhost pop IN CNAME www relay IN CNAME www smtp IN CNAME www @ IN MX 10 mail Using nslookup, all the subdomains and main domain gets looked up correctly, but beta.domain.com doesnt. I get "** server can't find beta.domain.com: NXDOMAIN" What am i doing wrong ? Do i need to wait longer ? When i use the ELB DNS name directly everything works as expected. When i do an NSlookup on my providers DNS Server, the CNAME gets resolved, but it looks like any other DNS server cant find the subdomain thanks in advance

    Read the article

  • JQuery .submit function will not submit form in IE

    - by Sean
    I have a form that submits some values to JQuery code,which then which sends off an email with the values from the form.It works perfectly in Firefox, but does not work in IE6(surprise!) or IE7. Has anyone any suggestions why? greatly appreciated?I saw on some blogs that it may have something to do with the submit button in my form but nothing Ive tried seems to work. Here is the form html: <form id="myform1"> <input type="hidden" name="itempoints" id="itempoints" value="200"> </input> <input type="hidden" name="itemname" id="itemname" value="testaccount"> </input> <div class="username"> Nickname: <input name="nickname" type="text" id="nickname" /> </div> <div class="email"> Email: <input name="email" type="text" id="email" /> </div> <div class="submitit"> <input type="submit" value="Submit" class="submit" id="submit" /> </div> </form> and here is my JQuery: var $j = jQuery; $j("form[id^='myForm']").submit(function(event) { var nickname = this.nickname.value; var itempoints = this.itempoints.value; var itemname = this.itemname.value; event.preventDefault(); var email = this.email.value; var resp = $j.ajax({ type:'post', url:'/common/mail/application.aspx', async: true, data: 'email=' +email + '&nickname=' + nickname + '&itempoints=' + itempoints + '&itemname=' + itemname, success: function(data, textStatus, XMLHttpRequest) { alert("Your mail has been sent!"); window.closepopup(); } }).responseText; return false; });

    Read the article

  • New To StructureMap - Getting No Default Instance Error 202

    - by Code Sherpa
    Hi. I am very new to StructureMap and am getting the following error: StructureMap Exception Code: 202 No Default Instance defined for PluginFamily Company.ProjectCore.Core.IUserSession, Company.ProjectCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null It seems to be hitting the first interface instance on compile and then throws the above error: private readonly IUserSession _userSession; public SiteMaster() { _userSession = ObjectFactory.GetInstance<IUserSession>(); // ERROR THROWN HERE ... } For what it is worth, I have the PluginFamily reference above all of interfaces: [PluginFamily("Default")] public interface IUserSession Below is my entire StructureMap.config <StructureMap> <Assembly Name="Company.ProjectWeb" /> <Assembly Name="Company.ProjectCore" /> <!-- Use DefaultKey="Default" for standard cache or DefaultKey="MemCached" for memcached cache. --> <PluginFamily Assembly="Company.ProjectCore" Type="Company.ProjectCore.Core.ICache" DefaultKey="MemCached" /> <!-- Use DefaultKey="Default" for sending the email in real time through the configured mail server or use DefaultKey="MailQueue" to send the mail in batches through another process --> <PluginFamily Assembly="Company.ProjectCore" Type="Company.ProjectCore.Core.IEmailService" DefaultKey="MailQueue" /> <!-- Use DefaultKey="Default" for standard cache or DefaultKey="UserSession" for memcached cache. --> <PluginFamily Assembly="Company.ProjectCore" Type="Company.ProjectCore.Core.IUserSession" DefaultKey="UserSession" /> <!-- Use DefaultKey="Default" for standard cache or DefaultKey="Redirector" for memcached cache. --> <PluginFamily Assembly="Company.ProjectCore" Type="Company.ProjectCore.Core.IRedirector" DefaultKey="Redirector" /> <!-- Use DefaultKey="Default" for standard cache or DefaultKey="Navigation" for memcached cache. --> <PluginFamily Assembly="Company.ProjectCore" Type="Company.ProjectCore.Core.INavigation" DefaultKey="Navigation" /> Any suggestions? Thanks.

    Read the article

  • Sending hidden fields via POST in iPhone in-app email

    - by Michael
    I'm letting my App's user send email from within the app to share some content on myserver. To do so I need to include a button with two bits of data and I want to use POST to keep it somewhat hidden. I've decided to add an html form using POST and two hidden fields in the email rather, like so: NSString *buttonCode = [NSString stringWithFormat:@"<form method='post' action='http://www.example.com/iphone/nifty.php'> <input type='hidden' name='dataOne' value='%@'> <input type='hidden' name='dataTwo' value='%@'> <input type='submit'value='Submit'></form>",dataOne, dataTwo]; NSString *emailBody = [NSString stringWithFormat: @"<b>%@ - %@</b>\n\n<HR WIDTH=200 SIZE=2 COLOR=#755f0f ALIGN=CENTER>\n Here is a email:<br><br>%@", dateString, timeString, buttonCode]; [picker setMessageBody:emailBody isHTML:YES]; I've confirmed by looking at the raw source of the email that the form is constructed correctly and I've copied and pasted it into a web page and it works. So here is the problem. When I click on the button in the received email (using apple's mail client) the dataOne and dataTwo variables don't get passed to my server. Is there a better way to do this or is the issue with my mail client?

    Read the article

  • What is the best "forgot my password" method?

    - by Edward Tanguay
    I'm programming a community website. I want to build a "forgot my password" feature. Looking around at different sites, I've found they employ one of three options: send the user an email with a link to a unique, hidden URL that allows him to change his password (Gmail and Amazon) send the user an email with a new, randomly generated password (Wordpress) send the user his current password (www.teach12.com) Option #3 seems the most convenient to the user but since I save passwords as an MD5 hash, I don't see how option #3 would be available to me since MD5 is irreversible. This also seems to be insecure option since it means that the website must be saving the password in clear text somewhere, and at the least the clear-text password is being sent over insecure e-mail to the user. Or am I missing something here? So if I can't do option #1, option #2 seems to be the simplest to program since I just have to change the user's password and send it to him. Although this is somewhat insecure since you have to have a live password being communicated via insecure e-mail. However, this could also be misused by trouble-makers to pester users by typing in random e-mails and constantly changing passwords of various users. Option #1 seems to be the most secure but requires a little extra programming to deal with a hidden URL that expires etc., but it seems to be what the big sites use. What experience have you had using/programming these various options? Are there any options I've missed?

    Read the article

  • ActionMailer sent with body unavailable in view

    - by yelvert
    So ive got a ActionMailer mailer class ReportMailer < ActionMailer::Base def notify_doctor_of_updated_document(document) recipients document.user.email_id from "(removed for privacy)" subject "Document #{document.document_number} has been updated and saved as #{document.status}" sent_on Time.now body :document => document end end and the view is Document <%= @document.class %> but when running >> d = Document.last => #<Document id: "fff52d70-7ba2-11de-9b70-001ec9e252ed", document_number: "ABCD1234", procedures_count: 0, user_id: "630", created_at: "2009-07-28 18:18:07", updated_at: "2009-08-30 20:59:41", active: false, facility_id: 94157, status: "incomplete", staff_id: nil, transcriptionist_id: nil, job_length: nil, work_type: nil, transcription_date: nil, non_trans_edit_date: nil, pervasync_flag: true, old_id: nil> >> ReportMailer.deliver_notify_doctor_of_updated_document(d) => #<TMail::Mail port=#<TMail::StringPort:id=0x8185326c> bodyport=#<TMail::StringPort:id=0x8184d6b4>> from the console this is printed in the log Sent mail to (removed for privacy) Date: Tue, 11 May 2010 20:45:14 -0500 From: (removed for privacy) To: (removed for privacy) Subject: Document ABCD1234 has been updated and saved as incomplete Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=mimepart_4bea082ab4ae8_aa4800b81ac13f5 --mimepart_4bea082ab4ae8_aa4800b81ac13f5 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline Document NilClass= --mimepart_4bea082ab4ae8_aa4800b81ac13f5--

    Read the article

  • ASP.NET-MVC Page: image logo is not displaying while sending the email

    - by Rita
    Hi I have a page that sends an email on ASP.NET MVC Page. All the Text is displaying but the image is not displaying. Any workaround. Appreciate your responses. Here is my code: MailMessage mailMsg = new MailMessage(); mailMsg.IsBodyHtml = true; mailMsg.From = new MailAddress(ConfigurationManager.AppSettings["Email.Sender"]); mailMsg.To.Add(new MailAddress(email)); mailMsg.Subject = "Test mail to display the Logo in the email"; mailMsg.Body = " Test mail to display the Logo in the email; mailMsg.Body += Environment.NewLine + Environment.NewLine + "<html><body><img src=cid:companylogo/><br></body></html>"; //Insert Logo string logoPath = Server.MapPath(Links.Content.images.Amgen_MedInfo_Logo_jpg); // logo is placed in images folder LinkedResource logo = new LinkedResource(logoPath); logo.ContentId = "companylogo"; // done HTML formatting in the next line to display logo AlternateView aView = AlternateView.CreateAlternateViewFromString(mailMsg.Body, new System.Net.Mime.ContentType("text/html")); aView.LinkedResources.Add(logo); mailMsg.AlternateViews.Add(aView); mailMsg.IsBodyHtml = true; SmtpClient smtpClient = new SmtpClient(ConfigurationManager.AppSettings["SMTP"]); smtpClient.Send(mailMsg);

    Read the article

  • Trouble with jquery email form submitHandler

    - by Robert
    Here is the code I'm using for the submitHandler: submitHandler: function() { $('.holder').fadeOut('slow'); $('#loading').fadeIn('slow'); $.post('email.php',{name:$('#em_name').val(), email:$('#em_email').val(), message:$('#em_message').val()}, function(data){ $('#loading').css({display:'none'}); if( data == 'success') { $('#callback').show().append('Message delivered successfully'); $('#emailform').slideUp('slow'); } else { $('#callback').show().append('Sorry but your message could not be sent, try again later'); } }); } This isn't working when used in conjunction with this php: <?php $name = stripcslashes($_POST['name']); $emailAddr = stripcslashes($_POST['email']); $message = stripcslashes($_POST['message']); $email = "Message: $message \r \n From: $name \r \n Reply to: $emailAddr"; $to = '[email protected]'; $subject = 'Message from example'; //validate the email address on the server side if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $emailAddr) ) { //if successful lets send the message mail($to, $subject, $email); echo('success'); //return success callback } else { echo('An invalid email address was entered'); //email was not valid } ?> Does anyone have any suggestions as to why this isn't working like it should. It seems to just lock up when I submit. Any help would be appreciated. Thanks!

    Read the article

  • 3 Servers, is this is a cluster?

    - by Andy Barlow
    Hello, At the moment I have one Ubuntu server, 9.10, running with a simple Samba share, a mail server, DNS server and DHCP server. Mostly its just there for file sharing and email server. I also have 2 other servers that are exactly the same hardware and spec as the first, which have an rsync set up to retrieve the shared folders and backs them up. However, if the first server goes down, all of our shares disappear along with our mail and the system must be rebuilt. Also I tend to find if people are downloading a large amount from the file server, no-one can access there emails - especially in the morning when everyone is signing in at once. Would it be more beneficial for me to have all 3 servers, all running the same services, doing the same thing with some sort of cluster with load balancing? I'm not really sure where to begin looking, or how to go about such a setup where 3 servers are all identical, but perhaps one acts as the main load balancer?? If someone can point me in the right direction, or if this simply sounds like one of those Enterprise Cloud's that is now a default setup in Ubuntu Server 9.10+, then I'll go down that route. Cheers in advance. Andy

    Read the article

  • iPhone app rejection for using ICU (Unicode extensions)

    - by nickbit
    I received the following mail form Apple, considering my application: *Thank you for submitting your update to ??µ??es?a to the App Store. During our review of your application we found it is using private APIs, which is in violation of the iPhone Developer Program License Agreement section 3.3.1; "3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs." While your application has not been rejected, it would be appropriate to resolve this issue in your next update. The following non-public APIs are included in your application: u_isspace ubrk_close ubrk_current ubrk_first ubrk_next ubrk_open If you have defined methods in your source code with the same names as the above mentioned APIs, we suggest altering your method names so that they no longer collide with Apple's private APIs to avoid your application being flagged with future submissions. Please resolve this issue in your next update to ??µ??es?a. Sincerely, iPhone App Review Team* The functions mentioned in this mail are used in the ICU library (International Components for Unicode). Although my app is not rejected at this point, I don't feel very secure for the future of my app, because it relies heavily on the Unicode protocol and on this components in particular. Another thing is that I do not call these functions directly, but they are called by a custom 'sqlite' build (with FTS3 extensions enabled). Am I missing something here? Any suggestions?

    Read the article

  • cakephp Activation Email Sending slow

    - by Michael
    Hi all, I have a simple email sender for user account activation. Depending on which email address I use, I get significantly different response times: University email - 1 minute, Gmail - 3-4 hours, Yahoo - 1 or 2 days -- which seems bizarre. Has anyone else seen this phenomenon? EDIT: There weren't many responses (even for a bounty), but I'll try to explain my problem more clearly. This probably isn't greylsting -- If I so a simple: php mail ($to, $subject, $body) // this delivers instantly. My cakephp code: function __sendActivationEmail($id) { $User = $this->User->read ( null, $id ); $this->set ( 'suffix_url', $User ['User'] ['id'] . '/' . $this->User->getActivationHash () ); $this->set ( 'username', $User ['User'] ['username'] ); $this->Email->to = $User ['User'] ['email']; $this->Email->subject = 'Test.com - ' . __ ( 'please confirm your email address', true ); $this->Email->from = '[email protected]'; $this->Email->template = 'user_confirm'; $this->Email->sendAs = 'text'; $this->Email->delivery = 'mail'; $this->Email->send (); } Causes delays from 13 minutes (ok; we'll deal with it) to 5-6 hours (less okay, since this is an activation email). For some of my users, it works instantly, but for other users (of the same service provider, i.e., gmail, it sees these delays). Any clues?

    Read the article

  • How can i attached iphone image through MFMailComposerView in iphone

    - by Pugal Devan
    Hi, I am new to iphone development. I have created a button in the view. On clicking the button it loads the photolibrary from the Iphone. Now i want to attached the those selected image through mail. I donno how can i attached the image in MFMailComposerView. How can i achieve this, Here my code is, -(IBAction) Pictures:(id)sender { self.imgpicker = [[UIImagePickerController alloc] init]; self.imgpicker.delegate = self; self.imgpicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:self.imgpicker animated:YES]; } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img1 editingInfo:(NSDictionary *)editInfo { [[picker parentViewController] dismissModalViewControllerAnimated:NO]; UIView *view = [[UIView alloc] init]; (This view for displaying the images) **imageview** = [[UIImageView alloc] initWithImage:img1]; [imageview setFrame:CGRectMake(0, 0, 320, 420)]; [self.view addSubview:imageview]; [view release]; UIBarButtonItem *rightbutton = [[UIBarButtonItem alloc] initWithTitle:@"Email" style:UIBarButtonItemStyleBordered target:self action:@selector(rightbutton)]; self.navigationItem.rightBarButtonItem = rightbutton; [rightbutton release]; } -(void) rightbutton { ***[self emailImage:(UIImage *)image]***;(I donno how to pass the image instance to mail view) } - (void)emailImage:(UIImage *)image { picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [picker setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]]; NSData *data = UIImagePNGRepresentation(image); [picker addAttachmentData:data mimeType:@"image/png" fileName:@"iPod Library Image"]; [self presentModalViewController:picker animated:YES]; [picker release]; } Plese help me out. Thanks.

    Read the article

  • Unit testing and mocking email sender in Python with Google AppEngine

    - by CVertex
    I'm a newbie to python and the app engine. I have this code that sends an email based on request params after some auth logic. in my Unit tests (i'm using GAEUnit), how do I confirm an email with specific contents were sent? - i.e. how do I mock the emailer with a fake emailer to verify send was called? class EmailHandler(webapp.RequestHandler): def bad_input(self): self.response.set_status(400) self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("<html><body>bad input </body></html>") def get(self): to_addr = self.request.get("to") subj = self.request.get("subject") msg = self.request.get("body") if not mail.is_email_valid(to_addr): # Return an error message... # self.bad_input() pass # authenticate here message = mail.EmailMessage() message.sender = "[email protected]" message.to = to_addr message.subject = subj message.body = msg message.send() self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("<html><body>success!</body></html>") And the unit tests, import unittest from webtest import TestApp from google.appengine.ext import webapp from email import EmailHandler class SendingEmails(unittest.TestCase): def setUp(self): self.application = webapp.WSGIApplication([('/', EmailHandler)], debug=True) def test_success(self): app = TestApp(self.application) response = app.get('http://localhost:8080/[email protected]&body=blah_blah_blah&subject=mySubject') self.assertEqual('200 OK', response.status) self.assertTrue('success' in response) # somehow, assert email was sent

    Read the article

  • Freemarker - lack of special character in email subject template cause email content crash

    - by freakman
    im fighting with strange error. Im using seperate freemarker templates for mail subject and body. It is sent using org.springframework.mail.javamail.JavaMailSender. Only templates that contains some special swedish character works in my application ( yes you read right... not the other way). If I delete it my email content crashes. It contains then: MIME-Version: 1.0 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: 7bit .. html code here .. My freemarker.properties file locale=sv_SE classic_compatible=false number_format= date_format=yyyy-MM-dd time_format=HH:mm datetime_format=yyyy-MM-dd HH:mm output_encoding=UTF-8 url_escaping_charset=UTF-8 auto_import=spring.ftl as spring auto_include= default_encoding=UTF-8 localized_lookup=true strict_syntax=true whitespace_stripping=true template_update_delay=10 Ive tried to convert subject file with dos2unix tool. Using 'find -bi subject.ftl' show that encoding is us-ascii. With added special character - utf-8. This thing is suprisingly strange for me... //SOLUTION: use :set bomb and save file in vim.

    Read the article

  • Parsing email with Python

    - by Manuel Ceron
    I'm writing a Python script to process emails returned from Procmail. As suggested in this question, I'm using the following Procmail config: :0: |$HOME/process_mail.py My process_mail.py script is receiving an email via stdin like this: From hostname Tue Jun 15 21:43:30 2010 Received: (qmail 8580 invoked from network); 15 Jun 2010 21:43:22 -0400 Received: from mail-fx0-f44.google.com (209.85.161.44) by ip-73-187-35-131.ip.secureserver.net with SMTP; 15 Jun 2010 21:43:22 -0400 Received: by fxm19 with SMTP id 19so170709fxm.3 for <[email protected]>; Tue, 15 Jun 2010 18:47:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.84.1 with SMTP id m1mr2774225mul.26.1276652853684; Tue, 15 Jun 2010 18:47:33 -0700 (PDT) Received: by 10.123.143.4 with HTTP; Tue, 15 Jun 2010 18:47:33 -0700 (PDT) Date: Tue, 15 Jun 2010 20:47:33 -0500 Message-ID: <[email protected]> Subject: TEST 12 From: Full Name <[email protected]> To: [email protected] Content-Type: text/plain; charset=ISO-8859-1 ONE TWO THREE I'm trying to parse the message in this way: >>> import email >>> msg = email.message_from_string(full_message) I want to get message fields like 'From', 'To' and 'Subject'. However, the message object does not contain any of these fields. What am I doing wrong?

    Read the article

  • How to add text to email sent from a php contact form

    - by JustStatic
    Hi all this is the PHP im using: <?php $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; $formcontent=" From: $name \n Phone: $phone \n Message: $message"; $recipient = "[email protected]"; $subject = "Contact Form"; $mailheader = "From: $email \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); echo "Thank You!" . " -" . "<a href='contact.html' style='text-decoration:none; color:#ff0099;'> Return Home</a>"; ?> Its working perfectly fine but i would like there to be some text sent with this email that says "This is from your website" or something similar to tell the recipient that it isnt spam (my client isn't tech friendly and sees everything plain text as spam). I'm very new to PHP with nearly 0 knowledge and have no idea how to add something like that. I did have a go at making a new variable with the string inside and then include that in the: mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); line but with no success. Thanks for taking the time any help would be welcome.

    Read the article

  • Can't override "From" address in MailMessage class using .config login credentials

    - by Jeff
    I'm updating some existing code that sends a simple email using .Net's SMTP classes. Sample code is below. The SMTP host is google and login info is contained in the App.config as shown below (obviously not real login info :)). The problem I'm having, and I haven't been able to find any answers Googling, is that I can NOT override the display of the "from" email address that's contained in the "username" attribute off the Network element in the config in the delivered email. In the line below that explicitly sets the From property off the myMailMessage object, that value, "[email protected]" does NOT display when the email is received. It still shows as "[email protected]" from the Network tag. However, the From name "Sparky" does appear in the email. I've tried adding a custom "From" header to the Header property of the myMailMessage but that didn't work either. Is there anyway to login to the smtp server, as shown below using the Network tag credentials, but in the actual email received override the From email address that's displayed? Sample code: MailMessage myMailMessage = new MailMessage(); myMailMessage.Subject = "My New Mail"; myMailMessage.Body = "This is my test mail to check"; myMailMessage.From = new MailAddress("[email protected]", "Sparky"); myMailMessage.To.Add(new MailAddress("[email protected]", "receiver name")); SmtpClient mySmtpClient = new SmtpClient(); mySmtpClient.Send(myMailMessage); in App.config: <system.net> <mailSettings> <smtp deliveryMethod="Network" from="[email protected]"> <network host="smtp.gmail.com" port="587" userName="[email protected]" password="mypassword" defaultCredentials="false"/> </smtp> </mailSettings> </system.net>

    Read the article

  • How to dismiss the MFMailComposeViewController in cocos2d ?

    - by srikanth rongali
    I have changed my code to this way. Now mail controller is opening in landscape mode. But the problem is If I touch on cancel button or send button the mail controller is not dismissing its view. How can I do it ? -(void)goToFirstScreen:(id)sender { NSLog(@"goToFirstScreen: "); CCScene *Scene = [CCScene node]; CCLayer *Layer = [EmailScene node]; [Scene addChild:Layer]; [[CCDirector sharedDirector] setAnimationInterval:1.0/60]; [[CCDirector sharedDirector] pushScene: Scene]; } Th EmailScene class is #import "EmailScene.h" #import "testOfEnd.h" @implementation EmailScene - (id) init { self = [super init]; if (self != nil) { [self displayComposerSheet]; } return self; } -(void)displayComposerSheet { [[CCDirector sharedDirector] pause]; picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [[[CCDirector sharedDirector] openGLView] addSubview:picker.view]; [[CCDirector sharedDirector] stopAnimation]; [picker presentModalViewController:picker animated:YES]; [picker release]; } - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [[CCDirector sharedDirector] resume]; //dismiss view after otherwise the code is not executed [picker.view removeFromSuperview]; [[CCDirector sharedDirector] startAnimation]; [picker dismissModalViewControllerAnimated:YES]; //return to previous scene CCScene *Scene = [CCScene node]; CCLayer *Layer = [testOfEnd node]; [Scene addChild:Layer]; [[CCDirector sharedDirector] replaceScene:Scene]; } @end Thank You.

    Read the article

  • Send POSTs to a PHP script on a server

    - by Sam Jarman
    I have a PHP script on a server <?php // retrieve POST vars $comment = $_POST['comment']; $email = $_POST['email']; // remove trailing whitespace etc $comment = trim($comment); $email = trim($email); // format date accoring to http://www.w3schools.com/php/func_date_date.asp $date_time = date("Y-m-d-H-i-s"); // i.e. 2010-04-15-09-45-23 // prepare message $to = "(removed my email addy)"; //who to send the mail to $subject = "Feedback from iPhone app"; //what to put in the subject line $message = "Name/Email: $email \r\n Comment: $comment"; mail($to, $subject,$message) or "bad"; echo "ok"; ?> How do I now send a POST request from my iPhone app... ive tried this sort of thing... NSURL *url = [NSURL URLWithString:@"mysite.com/script.php"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod:@"POST"]; NSString *message = boxForSuggestion.text; NSString *userEmailString = usersEmail.text; NSString *requestBodyString = [NSString stringWithFormat:@"comment:%@&email%@", message , userEmailString]; NSData *requestBody = [requestBodyString dataUsingEncoding:NSUTF8StringEncoding]; [request setHTTPMethod:@"POST" [request setHTTPBody:requestBody]; NSURLResponse *response = NULL; NSError *requestError = NULL; NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&requestError]; NSString *responseString = [[[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding] autorelease]; NSLog(@"%@", responseString); Any ideas? Thanks guys Sam

    Read the article

  • Unknown date shown for mails received from Mantis in Webmail

    - by Timw
    Hello, Im using Mantis bug tracker v1.1.8, and the Horde Webmail System for my company emails. When emails sent by Mantis arrive in my company inbox, i get Unknown Date in the Date field of the inbox view. When i open the message, i see the Date like Thu, 31 Dec 2009 14:32:15 +0580. The other mails, whose date i can see in the Inbox view have date in a format like Mon, 21 Dec 2009 06:56:18 +0100 [12/21/2009 11:26:18 AM IST] . For your reference i have pasted below the contents of my config_inc.php <?php $g_hostname = 'localhost'; $g_db_type = 'mysql'; $g_database_name = 'bugtracker_mantis'; $g_db_username = 'root'; $g_db_password = ''; # select the method to mail by: # 0 - mail() # 1 - sendmail # 2 - SMTP $g_phpMailer_method = 2; # This option allows you to use a remote SMTP host. Must use the phpMailer script # Name of smtp host, needed for phpMailer, taken from php.ini $g_smtp_host = <my_smtp_host>; $g_administrator_email = <my_administrator_email>; $g_webmaster_email = <my_webmaster_email>; $g_from_email = <my_from_email>; putenv("TZ=Asia/Calcutta"); #Date Settings $g_default_language = 'english'; $g_short_date_format = 'dm-Y'; $g_normal_date_format = 'dmY H: i'; $g_complete_date_format = 'm-d-y H:i T'; ?> Any way to fix this problem ? Thank You

    Read the article

  • Rails emails not sending in staging environment

    - by jrdioko
    In a Rails application I set up a new staging environment with the following parameters in its environments/ file: config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp However, when the system generates an email, it gets printed to the staging.log file instead of being sent. My SMTP settings work fine in other environments. What configuration am I missing to get the emails to actually send? Edit: Yes, the staging box is set up with valid configuration for an SMTP server it has access to. It seems like the problem isn't with the SMTP settings (if it was, wouldn't I get errors in the logs?), but with the Rails configuration. The application is still redirecting emails to the log file (saying "Sent mail: ...") as opposed to actually going through SMTP. Edit #2: It looks like the emails actually have been sending correctly, they just happen to print to the log as well. I'm trying to use the sanitize_email gem to redirect the mail to another address, and that doesn't seem to be working, which is why I thought the emails weren't going out. So I think that solves my problem, although I'm still curious what in ActionMailer's settings controls whether emails are sent, logged to the log file, or both. Edit #3: The problem with sanitize_email boiled down to me needing to add the new staging environment to ActionMailer::Base.local_environments. I'll keep this question open to see if anyone can answer my last question (what determines whether ActionMailer's emails get sent out, logged to the log file, or both?)

    Read the article

  • Error with Property Validation in Form Submission in ASP.NET MVC

    - by Maxim Z.
    I have a simple form on an ASP.NET MVC site that I'm building. This form is submitted, and then I validate that the form fields aren't null, empty, or improperly formatted. However, when I use ModelState.AddModelError() to indicate validation errors from my controller code, I get an error when my view is re-rendered. In Visual Studio, I get that the following line is highlighted as being the location of the error: <%=Html.TextBox("Email")%> The error is the following: NullReferenceException was unhandled by user code - object reference not set to an instance of an object. My complete code for that textbox is the following: <p> <label for="Email">Your Email:</label> <%=Html.TextBox("Email")%> <%=Html.ValidationMessage("Email", "*") %> </p> Here's how I'm doing that validation in my controller: try { System.Net.Mail.MailAddress address = new System.Net.Mail.MailAddress(email); } catch { ModelState.AddModelError("Email", "Should not be empty or invalid"); } return View(); Note: this applies to all of my fields, not just my Email field, as long as they are invalid.

    Read the article

< Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >