Search Results

Search found 10699 results on 428 pages for 'apple mail'.

Page 50/428 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • ASP.NET Error Handling: Creating an extension method to send error email

    - by Jalpesh P. Vadgama
    Error handling in asp.net required to handle any kind of error occurred. We all are using that in one or another scenario. But some errors are there which will occur in some specific scenario in production environment in this case We can’t show our programming errors to the End user. So we are going to put a error page over there or whatever best suited as per our requirement. But as a programmer we should know that error so we can track the scenario and we can solve that error or can handle error. In this kind of situation an Error Email comes handy. Whenever any occurs in system it will going to send error in our email. Here I am going to write a extension method which will send errors in email. From asp.net 3.5 or higher version of .NET framework  its provides a unique way to extend your classes. Here you can fine more information about extension method. So lets create extension method via implementing a static class like following. I am going to use same code for sending email via my Gmail account from here. Following is code for that. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Net.Mail; namespace Experiement { public static class MyExtension { public static void SendErrorEmail(this Exception ex) { MailMessage mailMessage = new MailMessage(new MailAddress("[email protected]") , new MailAddress("[email protected]")); mailMessage.Subject = "Exception Occured in your site"; mailMessage.IsBodyHtml = true; System.Text.StringBuilder errorMessage = new System.Text.StringBuilder(); errorMessage.AppendLine(string.Format("<B>{0}</B>:{1}<BR/>","Exception",ex.Message)); errorMessage.AppendLine(string.Format("<B>{0}</B>:{1}<BR/>", "Stack Trace", ex.StackTrace)); if (ex.InnerException != null) { errorMessage.AppendLine(string.Format("<B>{0}</B>:{1}<BR/>", " Inner Exception", ex.InnerException.Message)); errorMessage.AppendLine(string.Format("<B>{0}</B>:{1}<BR/>", "Inner Stack Trace", ex.InnerException.StackTrace)); } mailMessage.Body = errorMessage.ToString(); System.Net.NetworkCredential networkCredentials = new System.Net.NetworkCredential("[email protected]", "password"); SmtpClient smtpClient = new SmtpClient(); smtpClient.EnableSsl = true; smtpClient.UseDefaultCredentials = false; smtpClient.Credentials = networkCredentials; smtpClient.Host = "smtp.gmail.com"; smtpClient.Port = 587; smtpClient.Send(mailMessage); } } } After creating an extension method let us that extension method to handle error like following in page load event of page. using System; namespace Experiement { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender,System.EventArgs e) { try { throw new Exception("My custom Exception"); } catch (Exception ex) { ex.SendErrorEmail(); Response.Write(ex.Message); } } } } Now in above code I have generated custom exception for example but in production It can be any Exception. And you can see I have use ex.SendErrorEmail() function in catch block to send email. That’s it.. Now it will throw exception and you will email in your email box like below.   That’s its. It’s so simple…Stay tuned for more.. Happy programming.. Technorati Tags: Exception,Extension Mehtod,Error Handling,ASP.NET

    Read the article

  • Notification mail in open atrium

    - by Varun Bhat
    I have a problem on how to send mail on notification while editing or creating any contents in open atrium. I have followed as mentioned in below link https://community.openatrium.com/documentation-en/node/28 but was not successful in sending mail to notified user on creating or editing of contents. And also i wanted to send a mail to user when his credentials is changed or edited. May can anyone help me in rectifying this issues.

    Read the article

  • How to verify mail origin?

    - by MrZombie
    I wish to code a little service where I will be able to send an e-mail to a specific address used by my server to send specific commands to my server. I'll check against a list of permitted e-mail addresses to make sure no one unauthorized will send a command to the server, but how do I make sure that, say, an e-mail sent by "[email protected]" really comes from "thezombie.net"? I thought about checking the header for the original e-mail server's IP and pinging the domain to make sure it is the same, but would that be reliable? Example: Server receives a command from [email protected] [email protected] is authorized, proceed with checks Server checks "thezombie.net"'s IP from the header: W.X.Y.Z Server pings "thezombie.net" for it's IP: A.B.C.D The IPs do not correspond, do not process command Is there any better way to do that?

    Read the article

  • Elmah sends error mail on development server, but not on production

    - by Adrian Grigore
    Hi, I am trying to set up Elmah so that it sends me an e-mail when a new error occurs. This works fine on my development server, but on the production server no e-mail is sent. The exception is logged on the production server, it's just the e-mail that does not get sent. Here are my elmah configuration settings: <elmah> <security allowRemoteAccess="yes"/> <errorMail from="<MYGOOGLELOGIN>@googlemail.com" to="<MYGOOGLELOGIN>@googlemail.com" subject="ERROR From Elmah" async="false" smtpPort="587" useSsl="true" smtpServer="smtp.gmail.com" userName="<MYGOOGLELOGIN>@googlemail.com" password="<MYGOOGLEPASSWORD>" /> </elmah> I've tried different mail servers, both local and remote, and I tried both synchronous and asynchronous mail sending but to no avail. Now I don't have the slightest idea how to proceed (apart from debugging Elmah on my production server, which seems like a lot of effort to set up). Please help! Thanks, Adrian Edit: I might also add that I tried switching off the firewall on the production server, but that did not make any difference either.

    Read the article

  • Cloud e-mail and portal integration: experiences?

    - by Mark McLaren
    I am evaluating cloud e-mail solutions based upon: Google Apps for Education Microsoft Live@edu I work for a University and we currently have an institutional portal (based on uPortal). We currently have our local IMAP server and webmail client fully integrated with the portal. We would like to replicate the current portal e-mail experience with the new e-mail services. At present users can see a snapshot of their inbox in the portal and click through into the appropriate place in the webmail client. We expect that we need to solve similar problems when integrating with the cloud based e-mail solutions. We need to solve the single sign-on (SSO) problem. We need to be able to access the inbox messages on the users behalf. (e.g. proxy authentication) Does anybody have an experience or advice on this? Many thanks, Mark

    Read the article

  • mail script in php

    - by Piyush
    I am hosting my web application(pnpmkt.com) from GODADDY.com they have given me some email account like [email protected]. I want to send welcome message to new user's to their mail account in other mail servers like google, yahoo.for example, my mail function is- <?php $address = "[email protected]"; $Subject = "PNP Solutions"; $body = "Welcome to PNP"; $mailsend = mail("$address", "$Subject", "$body."); print("$mailsend"); ?> what other configurations are required?Any path name or server name??

    Read the article

  • passing java mail message object from between applications

    - by jezhilvalan
    I'm using java mail api 1.4.1 to obtain new emails. Two classes are being used to obtain emails and then parsing it. "GetMail" class communicates with mail server(Gmail,yahoo etc) and obtains the message object. Then the message object is passed to yet another class "MailFormatter" class, which then parses the message object, obtains the email headers (From,To,Subject etc) and then it parses the Multipart content to obtain the main body and attachments.Since both "Mail getting" and "Mail formatting" process are very resource intensive, these classes are going to be implemented as separate web applications.This application is going to monitor new emails for numerous email ids.If these ("GetMail" and "MailFormatter") are implemented as separate web applications, how can I pass the message object from "GetMail" app to "MailFormatter" app ? Is there a way through which I can persist the obtained message object in a certain location (a location which is common to both "GetMail" and "MailFormatter" applications), so that "GetMail" can persist the message object in that location, and then "MailFormatter" app can read "Message" objects from that location and carry out the parsing process. Message objects cannot be serialized. If they cannot be serialized how can I persist the state of java mail message object? please do help me to resolve this issue.

    Read the article

  • Java mail attachment not working on Tomcat

    - by losintikfos
    Hello guys, I have an application which e-mails confirmations. The email part utilises Commons Mail API. The simple code which does the send mail is as shown below; import org.apache.commons.mail.*; ... // Create the attachment EmailAttachment attachment = new EmailAttachment(); attachment.setURL(new URL("http://cashew.org/doc.pdf")); attachment.setDisposition(EmailAttachment.ATTACHMENT); attachment.setDescription("Testing attach"); attachment.setName("doc.pdf"); // Create the email message MultiPartEmail email = new MultiPartEmail(); email.setHostName("mail.cashew.com"); email.addTo("[email protected]"); email.setFrom("[email protected]"); email.setSubject("Testing); email.setMsg("testing message"); // add the attachment email.attach(attachment); // send the email email.send(); My problem is, when I execute this application from Eclipse, I get email sent with attachment without any issues. But when i deploy the application to Tomcat server (I have tried both version 5 & 6 no joy), the e-mail is sent with below content; ------=_Part_0_25002283.1275298567928 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit testing Regards, los ------=_Part_0_25002283.1275298567928 Content-Type: application/pdf; name="doc.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="doc.pdf" Content-Description: Testing attach JVBERi0xLjQNJeLjz9MNCjYzIDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDMxMzE4Mi9PIDY1L0Ug Mjg2NjY5L04gMS9UIDMxMTgwMi9IIFsgMjgzNiAzNzZdPj4NZW5kb2JqDSAgICAgICAgICAgICAg DQp4cmVmDQo2MyAxMjcNCjAwMDAwMDAwMTYgMDAwMDAgbg0KMDAwMDAwMzM4MCAwMDAwMCBuDQow MDAwMDAzNTIzIDAwMDAwIG4NCjAwMDAwMDQzMDcgMDAwMDAgbg0KMDAwMDAwNTEwOSAwMDAwMCBu DQowMDAwMDA2Mjc5IDAwMDAwIG4NCjAwMDAwMDY0MTAgMDAwMDAgbg0KMDAwMDAwNjU0NiAwMDAw MCBuDQowMDAwMDA3OTY3IDAwMDAwIG4NCjAwMDAwMDkwMjMgMDAwMDAgbg0KMDAwMDAwOTk0OSAw MDAwMCBuDQowMDAwMDExMDAwIDAwMDAwIG4NCjAwMDAwMTIwNTkgMDAwMDAgbg0KMDAwMDAxMjky MCAwMDAwMCBuDQowMDAwMDEyOTU0IDAwMDAwIG4NCjAwMDAwMTI5ODIgMDAwMDAgbg0KMDAwMDAx ....... CnN0YXJ0eHJlZg0KMTE2DQolJUVPRg0K ------=_Part_0_25002283.1275298567928-- One thing also I have noticed is, the header information donot show TO and Subject values. Hmm pretty wierd. I have to point out that, above is not generated of DEBUG, it is the actual message recieved in my outlook client. Can someone help me please! Do anyone knows what's going on?

    Read the article

  • sending mail using mutt + emacs

    - by lakshmipathi
    How to sent mail from emacs? I have add from address and subject and trapped inside emacs I found this There are two ways to send the message. C-c C-s (mail-send) sends the message and marks the mail buffer unmodified, but leaves that buffer selected so that you can modify the message (perhaps with new recipients) and send it again. C-c C-c (mail-send-and-exit) sends and then deletes the window or switches to another buffer But both ( ctrl+c ctrl+s ) and (ctrl-c crtl+c) are not working ps:Thought it's not programming related. it's programmer environment related question-hoping it won't be closed :)

    Read the article

  • Rails Mikel Mail Gem How to use Views

    - by Victor Martins
    I'm trying to use mikel gem mail on my 2.3.5 Rails App http://github.com/mikel/mail I have it working like this. I've made a MailComHelper, made a method like this : def self.welcome(user,password) @user = user m = Mail.new m.from = '[email protected]' m.to = @user.email m.subject = 'welcome' m.body = 'The body' m.delivery_method :sendmail m.deliver! end And it works, I receive the mail. But I wish I could use the old way of calling a view ( html.erb ) file and send that code has the body. I've read the documentation but haven't found a way to do it. Has anyone found a way to do it?

    Read the article

  • ixwebhosting php mail() issues with subject

    - by Dave
    I encounter a very strange problem with ixwebhosting. I am able to send email using the php mail() function with $subject = "test"; But if $subject = "testing of information send"; then i won't be able to receive any email But actually "Mail sent!" was displayed in the php page. if (!mail($email, $subject, $body, $from)) { echo "Error Sending Email!"; } else { echo "Mail sent!"; }

    Read the article

  • CRM mail merge and Word Macros/FILLINs

    - by xt_20
    Hi all, I'm currently using Microsoft CRM4 Mail merge function, which stores Word files as XML files inside CRM. My client has a requirement to prompt the user for more information (not found in CRM) upon mail merging. Previously, we used the Word 'FILLIN' commands, but it does not work with CRM mail merge as it only prompts the user before printing, not upon opening a Word file. I attempted using Macros, but can't seem to save macros to Microsoft Word 2003 XML file format. My questions: 1. Is there any way to get 'FILLIN' to prompt the user upon opening the mail merged file? 2. Can I store macros in Word 2003 XML file format? 3. Any other way around it, that involves merging CRM records with a Word file, and prompting the user for more information not already found in CRM? Many thanks for your help, AR

    Read the article

  • open iphone Mail from Actionsheet..

    - by totato
    hi .. I want to open Mail app from my app when the one button in actionsheet is pressed, I know this way : -(IBAtion)openClick:(id)sender { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”mailto:[email protected]”]]; } but can I write this method inside if statement or switch case?(in ControlView class NOT NSObject class , because I use actionsheet for this propose) like this: - (void)actionSheet:(UIActionSheet *)modalView clickedButtonAtIndex:(NSInteger)buttonIndex { switch (buttonIndex) { case 0: { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”mailto:[email protected]”]]; break; } I can't test my code because simulator doesn't have the Mail app.. So I need to know is this will work in controlView or must write it in NSObject class ? + seconde question : I want to open Mail app from my app and copy the content in the view to mail body,then the user choice the contact from his contacts list ! Is this way achieve my goal?

    Read the article

  • Installing twisted.mail.smtp

    - by user3506985
    I am using Ubuntu 14.04 and trying to install twisted.mail.smtp using the following commnands -sudo add-apt-repository ppa:jesstess/twisted-12.1-testing -sudo apt-get update There are no errors in the installation,but when I specify the command that is from twisted.mail.smtp import ESMTPSenderFactory I am getting the following error Error: ImportError: No module named mail.smtp Please help me out

    Read the article

  • send mail by using php5

    - by rajson
    hi friends, i wish to send form data throw mailto() in php, but i got an warning msg that "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\ please sugest me that what i have to do for send data to a mail id properly

    Read the article

  • Create "Mail Contact" in Microsoft Exchange

    - by Data-Base
    is it possible to create "Mail Contact" in Exchange with C#? any tips in where to start there is allot of info on how to create a mailbox (which is good), but I do not need it now I need to do that for the "Mail Contact" that everybody in the company has access to! so basically the "mail contacts" can be for people with external email addresses that all our users can see and send email too (GAL) oh and we have Microsoft Exchange 2007

    Read the article

  • how to add textbox in the mail body?

    - by Nimesh
    I am using asp.net and C#. I have a requirement in which i need to add one textbox in the mail body. After the user registration, i need to send a welcome mail. i tried to add the input tag in the mail body, but i am able to see on [ ](two square brackets). Can anyone tell me how to do this?

    Read the article

  • Problem with fetching mail using TMail in Ruby on Rails

    - by Shreyas Satish
    While fetching email, TMail appears to parse the email body twice,when I use this code.All the other parameters are fine(from_email,email_subject). Any ideas? def get_mail Net::POP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE) Net::POP3.start('pop.gmail.com', 995, "uname","pass") do |pop| mail_header=[];mail_subject=[];mail_body=[];mail_from=[] unless pop.mails.empty? pop.each_mail do |mail| email = TMail::Mail.parse(mail.pop) mail_subject = email.subject mail_body = email.body mail_from = email.from email_obj=EmailedQueries.new email_obj.save_email(mail_from, mail_subject, mail_body) end end end end

    Read the article

  • Ajax and PHP problem not sending mail

    - by Dumbledore of flash
    Hi all , I have a problem here, I have two files form.php and index.php , my form.php has an ajax to fetch data from index.php , also my index.php has a mail function which is running perfectly when we run index.php directly, but when i form.php to fetch data from index.php this mail function is not running ..... can any body tell me whats the problem why ajax does not make my index.php send mail ?????

    Read the article

  • Pushing a mail include to a java program

    - by Marthin
    Hi, I have a Windows Server that recives mail. These mail contains only 1 single CSV file. I want my server to automatically take the attachment from any incoming mail and send to a java program locally installed. Is there anyone who can give me directions on any programs that fix this or do I need to create some kind of windows service? Thankful for any help!

    Read the article

  • php mail send form question?

    - by eberswine
    Wondering if anyone know how to automatically send the user an email after he/she fills out a form. I have the form emailed to me after it gets submitted, but I can't figure out how to capture the user's email from the form field and have it send it to them automatically??? Here is some code that I use to send the mail: //mail the message before redirecting if($_POST['dosend'] == "yes"){ // The message $headers = "From: [email protected]"; $message = "NEW Message :: ".$_POST['event_name']." \n Email: ".$_POST['email']." \n Click link to http://www.domain.com/admin/ Approve this Event!"; // Send mail('[email protected]', 'New :: Calendar Message', $message, $headers); } //end mail

    Read the article

  • PHP Mail Function

    - by vgathan
    Is it possible to send a mail in PHP without any external packages or tools? If so, is there any requirement to configure the php.ini file? Its as follows: $to = $row-EMail_ID; $subject = "Reset your password"; $body = "Hi ".$row->Username.", \n\t\t\tA request to reset your password was received from you. \n\n\n"; $headers = "From: [email protected]\r\n"."X-Mailer: php/"; mail($to, $subject, $body, $headers); The error i get: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\wamp\www\pwd.php on line 20

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >