Search Results

Search found 1810 results on 73 pages for 'smtp'.

Page 30/73 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • 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

  • How to receive Email in JEE application

    - by Hank
    Obviously it's not so difficult to send out emails from a JEE application via JavaMail. What I am interested in is the best pattern to receive emails (notification bounces, mostly)? I am not interested in IMAP/POP3-based approaches (polling the inbox) - my application shall react to inbound emails. One approach I could think of would be Keep existing MTA (postfix on linux in my case) - ops team already knows how to configure / operate it For every mail that arrives, spawn a Java app that receives the data and sends it off via JMS. I could do this via an entry in /etc/aliases like myuser: "|/path/to/javahelper" with javahelper calling the Java app, passing STDIN along. MDB (part of JEE application) receives JMS message, parses it, detects bounce message and acts accordingly. Another approach could be Open a listening network socket on port 25 on the JEE application container. Associate a SessionBean with the socket. Bean is part of JEE application and can parse/detect bounces/handle the messages directly. Keep existing MTA as inbound relay, do all its security/spam filtering, but forward emails to myuser (that pass the filter) to the JEE application container, port 25. The first approach I have done before (albeit in a different language/setup). From a performance and (perceived) cleanliness point of view, I think the second approach is better, but it would require me to provide a proper SMTP transport implementation. Also, I don't know if it's at all possible to connect a network socket with a bean... What is your recommendation? Do you have details about the second approach?

    Read the article

  • Sending Email over VPN SmtpException net_io_connectionclosed

    - by Holy Christ
    I am sending an email from a WPF application. When sending as a domain user on the network, the emails sends as expected. However, when I attempt to send email over a VPN connection, I get the following exception: Exception: System.Net.Mail.SmtpException: Failure sending mail. --- System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) I have tried using impersonation as well as setting the Credentials on the SmtpClient. Neither seem to work: using (new ImpersonateUser("myUser", "MYDOMAIN", "myPass")) { var client = new SmtpClient("myhost.com"); client.UseDefaultCredentials = true; client.Credentials = new NetworkCredential("myUser", "myPass", "MYDOMAIN"); client.Send(mailMessage); } I've also tried using Wireshark to view the message over the wire, but I don't know enough about SMTP to know what I'm looking for. One other variable is that the machine I'm using on the VPN is Vista Business and the machine on the network is Win7. I don't think it's related, but then I wouldn't be asking if I knew the issue! :) Any ideas?

    Read the article

  • How to configure Spring JavaMailSenderImpl for Gmail

    - by Andrew Carlson
    I am trying to find the correct properties to use to connect to the Gmail SMTP sever using the JavaMailSenderImpl class. Let me first say that I have tried the approach found here. This worked fine. But when I tried the configuration below that post with the exact same authentication information I received a javax.mail.AuthenticationFailedException. My currently configuration looks like this. <bean id="mailSender" class ="org.springframework.mail.javamail.JavaMailSenderImpl" > <property name="username" value="[email protected]" /> <property name="password" value="XXX" /> <property name="javaMailProperties"> <props> <prop key="mail.smtp.host">smtp.gmail.com</prop> <prop key="mail.smtp.port">587</prop> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.starttls.enable">true</prop> </props> </property> </bean> Why am I still getting this javax.mail.AuthenticationFailedException if I know that my credentials are correct. Update Here is my updated code based on the answers below. I am still receiving the same exception. <bean id="mailSender" class ="org.springframework.mail.javamail.JavaMailSenderImpl" > <property name="username" value="[email protected]" /> <property name="password" value="XXX" /> <property name="javaMailProperties"> <props> <prop key="mail.smtp.from">[email protected]</prop> <prop key="mail.smtp.user">[email protected]</prop> <prop key="mail.smtp.password">XXX</prop> <prop key="mail.smtp.host">smtp.gmail.com</prop> <prop key="mail.smtp.port">587</prop> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.starttls.enable">true</prop> </props> </property> </bean>

    Read the article

  • Send Mail through Jsp page.

    - by sourabhtaletiya
    hi friends ,i have tried alot to send mail via jsp page but i am not succeded. A error is coming javax.servlet.ServletException: 530 5.7.0 Must issue a STARTTLS command first. x1sm5029316wbx.19 <html> <head> <title>JSP JavaMail Example </title> </head> <body> <%@ page import="java.util.*" %> <%@ page import="javax.mail.*" %> <%@ page import="javax.mail.internet.*" %> <%@ page import="javax.activation.*" %> <% java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); Properties props = System.getProperties(); props.put("mail.smtp.starttls.enable","true"); props.put("mail.smtp.starttls.required","true"); String host = "smtp.gmail.com"; String to = request.getParameter("to"); String from = request.getParameter("from"); String subject = request.getParameter("subject"); String messageText = request.getParameter("body"); boolean sessionDebug = false; props.put("mail.smtp.host", "smtp.gmail.com"); props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.port", "25"); props.put("mail.smtp.auth", "true"); props.put("mail.debug", "true"); props.put("mail.smtp.socketFactory.port","25"); props.put("mail.smtp.starttls.enable","true"); Session mailSession = Session.getDefaultInstance(props, null); mailSession.setDebug(sessionDebug); Message msg = new MimeMessage(mailSession); props.put("mail.smtp.starttls.enable","true"); msg.setFrom(new InternetAddress(from)); InternetAddress[] address = {new InternetAddress(to)}; msg.setRecipients(Message.RecipientType.TO, address); msg.setSubject(subject); msg.setSentDate(new Date()); msg.setText(messageText); props.put("mail.smtp.starttls.enable","true"); Transport tr = mailSession.getTransport("smtp"); tr.connect(host, "sourabh.web7", "june251989"); msg.saveChanges(); // don't forget this props.put("mail.smtp.starttls.enable","true"); tr.sendMessage(msg, msg.getAllRecipients()); tr.close(); // Transport.send(msg); /* out.println("Mail was sent to " + to); out.println(" from " + from); out.println(" using host " + host + ".");*/ %> </table> </body> </html>

    Read the article

  • How to use perl for SMTP connection with user and SSL Auth and send emails with attachment

    - by Octopus
    I am using a SMTP mail server which require user + ssl authentication for connection. I am looking for the perl modules to connect to the mail server and send emails but doesn't found anything helpful. Any suggestion for perl module or any perl code would be really appreciated. EDIT I have tried to use Mail::Sendmail and Net::SMTP::SSL to connect to the sendmail server and send mail. Below is the sample code but getting the error user unknown. Error: mail: Net::SMTP::SSL=GLOB(0x9599850) not found RCPT TO: error (550 5.1.1 <[email protected]>... User unknown). Code: #!/usr/bin/perl use strict; use warnings; use Mail::Sendmail; use Net::SMTP::SSL; my %mail = ( #To=> 'No to field this time, only Bcc and Cc', From=> '[email protected]', Cc=> '[email protected]', # Cc will appear in the header. (Bcc will not) Subject => 'Test message', 'X-Mailer' => "Mail::Sendmail version $Mail::Sendmail::VERSION", ); $mail{Smtp} = Net::SMTP::SSL->new("mail.server.com", Port=> 465); $mail{auth} = {user=>'username', password=>"password", required=>1 }; $mail{'X-custom'} = 'My custom additionnal header'; $mail{Message} = "The message key looks terrible, but works."; # cheat on the date: $mail{Date} = Mail::Sendmail::time_to_date( time() - 86400 ); if (sendmail %mail) { print "Mail sent OK.\n" } else { print "Error sending mail: $Mail::Sendmail::error \n" } print "\n\$Mail::Sendmail::log says:\n", $Mail::Sendmail::log;

    Read the article

  • How do I route my SMTP outgoing mail through gmail (Google Mail) ?

    - by Paula DiTallo
    Here is the quick answer:  Go into your client e software (e.g. Outlook, Thunderbird, etc.) for the account you are working on (usually default). Set the SMTP server to smtp.gmail.com Set the username as your gmail account user name (e.g. [email protected]). Gmail will need the username and password you use for that account, so if your default is set to some other email, be sure to set the username and password to that value, or click on the checkbox for username/password. Check TLS as the secure connection.   If you are looking for more in-depth info, check out Gina Trapani 's block on the topic.

    Read the article

  • postfix cannot send email

    - by AKLP
    I'd like to mention that im really new to this so please bear with me. I'm trying to setup a forum software to send emails via postfix but I think my server has the port 25 blocked. I tried running these: works: ping alt2.gmail-smtp-in.l.google.com don't work: telnet alt2.gmail-smtp-in.l.google.com 25 telnet 66.249.93.114 25 tried flushing iptables and then using these rules but didn't work either: sudo iptables --flush sudo iptables -P INPUT ACCEPT sudo iptables -P OUTPUT ACCEPT sudo iptables -P FORWARD ACCEPT sudo iptables -F sudo iptables -X doing a telnet on 25 port to localhost url works but nothing when telnet'ing in none local urls. mail.log: Oct 17 01:20:24 webhost postfix/smtp[3642]: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400e:c03::1a]:25: Connection timed out Oct 17 01:20:24 webhost postfix/smtp[3643]: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400e:c03::1a]:25: Connection timed out Oct 17 01:20:24 webhost postfix/smtp[3642]: 4744380032: to=<[email protected]>, relay=none, delay=2892, delays=2741/0.03/150/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2607:f$

    Read the article

  • Embedding more text into the mail body in SMTP Gmail sender

    - by Rahul Varma
    Hi folks, I am using Gmail sender function defined here to send a mail to the predefined mail id. But my problem is that i want to embed more text into the body of my mail... The Gmail sender is only accepting one sting to be embedded into the body of the mail. Can anyone tell me how to embed more strings into the body of the mail... If Gmail sender is not efficient method to send a mail then please suggest me an alternative with an example....

    Read the article

  • send the new password - Asp.net - using gmail ( smtp.gmail.com )

    - by user331225
    Hi All, I've gone through all helps and all forums., but none of them have helped me. Here is my problem Developing a site on localhost using ASP.NET 3.5 I want to provide 'forgot password' functionality using <asp:PasswordRecovery> Any real help is greatly appreciated. Please note that I want to send it by either changing web.config OR programatically. Thanks

    Read the article

  • Using JavaMail to send a mail containing Unicode characters

    - by NoozNooz42
    I'm successfully sending emails through GMail's SMTP servers using the following piece of code: Properties props = new Properties(); props.put("mail.smtp.host", "smtp.gmail.com"); props.put("mail.smtp.socketFactory.port", "465"); props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory"); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.port", "465"); props.put("mail.smtp.ssl", "true"); props.put("mail.smtp.starttls.enable","true"); props.put("mail.smtp.timeout", "5000"); props.put("mail.smtp.connectiontimeout", "5000"); // Do NOT use Session.getDefaultInstance but Session.getInstance // See: http://forums.sun.com/thread.jspa?threadID=5301696 final Session session = Session.getInstance( props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication( USER, PWD ); } }); try { final Message message = new MimeMessage(session); message.setFrom( new InternetAddress( USER ) ); message.setRecipients( Message.RecipientType.TO, InternetAddress.parse( TO ) ); message.setSubject( emailSubject ); message.setText( emailContent ); Transport.send(message); emailSent = true; } catch ( final MessagingException e ) { e.printStackTrace(); } where emailContent is a String that does contain Unicode characters (like the euro symbol). When the email arrives (in another GMail account), the euro symbol has been converted to the ASCII '?' question mark. I don't know much about emails: can email use any character encoding? What should I modify in the code above so that an encoding allowing Unicode characters is used?

    Read the article

  • Mail not being sent when using phpmailer

    - by mithunmo
    I am using the following code to send mail to a smtp server . <?php // example on using PHPMailer with GMAIL include("PHPMailer/class.phpmailer.php"); include("PHPMailer/class.smtp.php"); // note, this is optional - gets called from main class if not already loaded $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; // enable SMTP authentication $mail->Host = "mucse491.eu.xxxxx.com"; // sets GMAIL as the SMTP server $mail->Port = 143; // set the SMTP port $mail->Username = "[email protected]"; // GMAIL username $mail->Password = "xxxx"; // GMAIL password $mail->From = "[email protected]"; $mail->FromName = "mithun"; $mail->Subject = "This is the subject"; $mail->AltBody = "This is the body when user views in plain text format"; //Text Body $mail->WordWrap = 50; // set word wrap $mail->AddAddress("[email protected]","First Last"); $mail->IsHTML(true); // send as HTML if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message has been sent"; } ?> When I run it from the command line I get the following error PHP Deprecated: Function eregi() is deprecated in C:\wamp\www\phpmailer\class.p hpmailer.php on line 593 Deprecated: Function eregi() is deprecated in C:\wamp\www\phpmailer\class.phpmai ler.php on line 593 PHP Warning: fputs() expects parameter 1 to be resource, integer given in C:\wa mp\www\phpmailer\class.smtp.php on line 213 Warning: fputs() expects parameter 1 to be resource, integer given in C:\wamp\ww w\phpmailer\class.smtp.php on line 213 Mailer Error: SMTP Error: Could not connect to SMTP host. When i run from the browser I get the following error Deprecated: Function eregi() is deprecated in C:\wamp\www\phpmailer\class.phpmailer.php on line 593 Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. in C:\wamp\www\phpmailer\class.smtp.php on line 122 Warning: fsockopen() [function.fsockopen]: unable to connect to mucse491.xx.xxxxx.com:143 (php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. ) in C:\wamp\www\phpmailer\class.smtp.php on line 122 Mailer Error: SMTP Error: Could not connect to SMTP host. Please someone guide me .

    Read the article

  • SSIS Send Mail task limited to 255 characters in address?

    - by CodeByMoonlight
    Is this a bug, or some hidden limit I can't find any documentation about? When creating a Send Mail Task in SSIS 2008, the TO, CC and BCC fields seem to have a hidden limit of 255 characters. I'm aware this is the standard limit for individual email addresses, but all three are commonly used for multiple addresses and the comment for the To field even says "separate the recipients with semicolons". But nevertheless, it truncates the address to a maximum of 255 characters. Bug, non-obvious standard, or something I'm missing? Any way around this? We were trying to build a CC list dynamically, but this has caused a rethink.

    Read the article

  • SmtpClient.SendAsync(); Not working on 64bit computer.

    - by j-t-s
    Hi All, Okay, Only a couple weeks ago I had an old 32bit computer, but had to buy a new computer, which happens to be 64bit. I've rewritten the method that sends e-mails asynchonously and it just does not work. And does NOT throw any exceptions either. What gives? I have also tried the Async method code found iin MSDN, and the BlackWasp tutorial code, and MANY others. They're all the same! The only difference here seems to be the fact that I'm now on a 64bit computer. How can I get around this? Google/MSDN has been of zero help. Thanks

    Read the article

  • Why is SwiftMailer throwing "Internal Server Error"?

    - by Josamoto
    I am using Symfony + SwiftMailer and getting the following error from SwiftMailer: 500 | Internal Server Error | Swift_TransportException Expected response code 220 but got code "", with message "" and can't figure out why. I am using hMailServer on my local machine, and have setup my factories.yml file (as I'm using Symfony) as follows: mailer: class: sfMailer param: logging: %SF_LOGGING_ENABLED% charset: %SF_CHARSET% delivery_strategy: realtime transport: class: Swift_SmtpTransport param: host: splodge.loc port: 25 encryption: ~ username: ~ password: ~ I'm using the following code to send: $message = $this->getMailer()->compose( '[email protected]', '[email protected]', 'Reset Password', 'Message' ); $result = $this->getMailer()->send($message); Has anyone had an issue like this before? I have found that sometimes, and very randomly, the send goes through, but every other time, I get the above error message. So constantly refreshing the page that sends the mail, fails unpredictably, and as the code sometimes works, it's kinda hard to figure out what's wrong. Any help will be highly appreciated!

    Read the article

  • javamail vs sendmail performance during bulk email

    - by Glenn2041
    Hi all, I'm writing a Java mass emailer application to send out emails to send between 50,000 to 100,000 a day to users. The current plan is to delegate the sending to delegate to sendmail (on the local unix server). From our testing sendmail is sending a maximum of 5 emails per second. Would JavaMail be a faster option? Does anyone know what a faster way to send emails. We want to get this process out as quick as possible. Edit: BTW, a pdf will be attached too

    Read the article

  • sendmail redhat

    - by lepricon123
    For some reason even after providing the sender's from adress my mails are not being delivered as from is missing as below maillog. Any suggestions? May 8 20:08:43 tawq02 sendmail[13443]: o4938hJD013443: ruleset=check_mail, arg1=<{}, relay=localhost.localdomain [127.0.0.1], reject=553 5.5.4 <{}... Domain name required for sender address {} May 8 20:08:43 tawq02 sendmail[13443]: o4938hJD013443: from=<{}, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]

    Read the article

  • How to distribute email's delivery between 2 or more servers

    - by user181186
    We provide Email Marketing service through our online App. We have about 30 customers. And each one has it's own mailling list (5k to 20k emails each). What we really want is to distribute email's delivery between 2 or more servers. I was wondering What kind of aproach/solutions MailChimp , Constant Contact uses to provide a great service ? use many servers ? many IPs ? Our spam policy suspends ANY user/customer that gets 10% bounced .

    Read the article

  • Best practices: Sending email on behalf of users

    - by Ben Doom
    The company I work for provides testing services for the healthcare industry. As part of our services, we need to send email to our clients' employees. Typically, these are temp, part-time, or contract employees, and so have private email addresses (eg Hotmail, GMail, Yahoo!, etc). Up to now, we've been sending from an internal address, but this means that replies come back to us when employees aren't paying attention or don't know to send queries to our clients. I'd like to change this, so that the person who requests that the email is sent is the person that is replied to. We've used reply-to: in the past, but it seemed to cause additional mail to be trapped by spam filters. I've been reading about sender: and on-behalf-of: headers, and was wondering what the current best-practice was for sending email in a scenario where we need to send email such that the reply goes to a domain we don't control.

    Read the article

  • Sending emails in web applications

    - by Denise
    Hi everyone, I'm looking for some opinions here, I'm building a web application which has the fairly standard functionality of: Register for an account by filling out a form and submitting it. Receive an email with a confirmation code link Click the link to confirm the new account and log in When you send emails from your web application, it's often (usually) the case that there will be some change to the persistence layer. For example: A new user registers for an account on your site - the new user is created in the database and an email is sent to them with a confirmation link A user assigns a bug or issue to someone else - the issue is updated and email notifications are sent. How you send these emails can be critical to the success of your application. How you send them depends on how important it is that the intended recipient receives the email. We'll look at the following four strategies in relation to the case where the mail server is down, using example 1. TRANSACTIONAL & SYNCHRONOUS The sending of the email fails and the user is shown an error message saying that their account could not be created. The application will appear to be slow and unresponsive as the application waits for the connection timeout. The account is not created in the database because the transaction is rolled back. TRANSACTIONAL & ASYNCHRONOUS The transactional definition here refers to sending the email to a JMS queue or saving it in a database table for another background process to pick up and send. The user account is created in the database, the email is sent to a JMS queue for processing later. The transaction is successful and committed. The user is shown a message saying that their account was created and to check their email for a confirmation link. It's possible in this case that the email is never sent due to some other error, however the user is told that the email has been sent to them. There may be some delay in getting the email sent to the user if application support has to be called in to diagnose the email problem. NON-TRANSACTIONAL & SYNCHRONOUS The user is created in the database, but the application gets a timeout error when it tries to send the email with the confirmation link. The user is shown an error message saying that there was an error. The application is slow and unresponsive as it waits for the connection timeout When the mail server comes back to life and the user tries to register again, they are told their account already exists but has not been confirmed and are given the option of having the email re-sent to them. NON-TRANSACTIONAL & ASYNCHRONOUS The only difference between this and transactional & asynchronous is that if there is an error sending the email to the JMS queue or saving it in the database, the user account is still created but the email is never sent until the user attempts to register again. What I'd like to know is what have other people done here? Can you recommend any other solutions other than the 4 I've mentioned above? What's a reasonable way of approaching this problem? I don't want to over-engineer a system that's dealing with the (hopefully) rare situation where my mail server goes down! The simplest thing to do is to code it synchronously, but are there any other pitfalls to this approach? I guess I'm wondering if there's a best practice, I couldn't find much out there by googling.

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >