My project is in codeigniter, i am sending mails in it with following code snippet, its working fine, just problem is that mail are going into spam folder of users, why this is happening, please suggest me the changes in following code snippet.   My Code Snippet:  $subject = 'Test Subject'; $config['protocol'] = 'smtp'; $config['smtp_host'] = "localhost"; $config['smtp_port'] = "25"; $config['charset']  = 'utf-8'; $config['wordwrap'] = TRUE; $config['mailtype'] = 'html'; $config['bcc_batch_mode'] = TRUE; $config['crlf'] = '\r\n'; $config['newline']  = '\r\n'; $this-&gt;email-&gt;initialize($config); $this -&gt; load -&gt; library('email');  $msg = "Test Message";  $this -&gt; email -&gt; from('admin@domain.com','Domain Name'); $this -&gt; email -&gt; to('user@gmail.com'); $this -&gt; email -&gt; subject($subject); $this -&gt; email -&gt; message($msg); $this -&gt; email -&gt; send();   What is settings to prevent mail from spam folders??
949
This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.
80492
I'm having some trouble with setting up a SMTP server on a windows server 2003 machine, while trying to send emails using PHP through the internet, but to domain email addresses.  Common info:   Machine has Windows Server 2003 Server Machine on a domain (mydomain.com) Machine is not a domain controller Machine accesses a domain controller through the internet (WAN with a corporate VPN link by the internet provider setup on the machine's gateway - adsl modem/router) Email addresses use the same suffix (mydomain.com) Do not have access to domain controller configuration   First Scenario   TCP/IP DNS: 1st 192.168.200.xxx   2nd 8.8.8.8 Direct access to domain controller is functional PHP mail using localhost to a user@mydomain.com won't work, because the remote mail server rejects emails from internal traffic (apparently!?!)   Second Scenario   TCP/IP DNS: 1st  8.8.8.8   2nd 192.168.200.xxx   (switched) Direct access to domain controller is not functional, only local accounts work PHP mail using localhost to a user@mydomain.com does work, because the remote mail server is accessed through its internet/external address.   So, what I needed is to have both (1) access to the domain controller and (2) PHP mail using localhost to a user@mydomain.com account working.  Any pointers? Thanks in advance
79732
I am receiving emails that has been copied to a several email addresses. For example, an email is copied to engineering.myorg@gmail.com and marketing.myorg@gmail.com and I have subscribed to these two email groups; hence I am getting these emails. And there are some other emails those are only sent to marketing.myorg@gmail.com.   Let's say that I have created two filters, and some email belong to both of these groups. I need to filter the emails that exclusively are sent to marketing.myorg@gmail.com to delete those at once.  How can I do this?  Note: The actual mail groups are in format of mail-group@myorg.com; because, our organization is using gmail application for email.
96698
I just signed up, a day or two ago, and I've received a notification that there's something in my inbox.  Unfortunately, my email client isn't able to show me a link to my Inbox, or the message, because of the format of the email.  I normally use the email address that I gave when I signed up, just with MailWasher, which is intended to safely preview emails, as plain text, to decide whether or not to open them in a normal HTML email client.  I would be nice if that email contained a link to my inbox, which could be shown in MailWasher.  In order to collect that email in a normal email client, I'd also have to collect or delete all the other emails sent to that address.  I'm not entirely clear what's been done in that email to stop MailWasher seeing the link.  I can see a link to leave feedback, and one to unsubscribe, but not one to check my inbox.  Sure, I can live without one, but those emails would be a lot more useful to me if I could just click a link to go to my Inbox.
80447
I'm a bit confused as to why people make bots to do this - is it to find vulnerabilities?   I recently upgraded my contact form security with more client and server side validation, including a honeypot and log/ban to stop erroneous submissions on my contact forms.  While this cured the issue quick fast and in a hurry, I'm still not 100% sure why this even happens.  continued Most of the submissions were gibberish, however, I did recently have an email hijacked and a malicious script tried to send thousands (almost 6,000) spam emails in just a few minutes.  I think a weak password was the cause and I'm not convinced they're related, but the  possibility looms in my mind. Thankfully, my server has a threshold of 500 emails per hour and cut it 5,500 short.
53179
What in all actually is this PDF attachment doing with the newsletter?    I'm fairly confident that this also came from Stack Exchange, so would someone care to enlighten me as to what's going on?  I admit I'm rusty at reading mail headers, but the sources seem to line up just fine.  Delivered-To: --REDACTED-- Received: by 10.229.68.6 with SMTP id t6csp224071qci;         Fri, 20 Mar 2015 12:28:47 -0700 (PDT) X-Received: by 10.55.31.97 with SMTP id f94mr119580342qkf.10.1426879727323;         Fri, 20 Mar 2015 12:28:47 -0700 (PDT) Return-Path: &lt;do-not-reply@stackexchange.com&gt; Received: from mx-out.stackexchange.com (mx-out.stackexchange.com. [198.252.206.125])         by mx.google.com with ESMTPS id i90si5136899qge.83.2015.03.20.12.28.46         for &lt;--REDACTED--&gt;         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);         Fri, 20 Mar 2015 12:28:47 -0700 (PDT) Received-SPF: pass (google.com: domain of do-not-reply@stackexchange.com designates 198.252.206.125 as permitted sender) client-ip=198.252.206.125; Authentication-Results: mx.google.com;        spf=pass (google.com: domain of do-not-reply@stackexchange.com designates 198.252.206.125 as permitted sender) smtp.mail=do-not-reply@stackexchange.com;        dkim=pass header.i=@stackexchange.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackexchange.com; s=dk;     h=Content-Type:Message-ID:Date:Subject:Reply-To:To:From:MIME-Version; bh=1OWPTURI/S9xuD+By0vS6qm84rNbZTEnVTBe0n3jV2Q=;     b=VEwIjIH/yuaj1DiAJMIuXOs8vPo1fhJOHhM7v9IWtvRozVyDnMzZBeFVsaAiUDSmsMrXb8sH3X0TU2a94KkuzByGyong8s4pRn6CridgSwOJuQ1OLhN/zSNiSu00rPENBxFhmiABN0PNx8m6S8OZHwMMPob6SzQUm5IK1JsjFxY=; Received: from [10.7.2.15] (helo=[10.7.2.101])     by mx-out.stackexchange.com with esmtp (Exim 4.72)     (envelope-from &lt;do-not-reply@stackexchange.com&gt;)     id 1YZ0VC-0006l0-SY     for --REDACTED--; Fri, 20 Mar 2015 17:14:30 +0000 MIME-Version: 1.0 X-Mailer: MailBee.NET 7.0.4.334 From: "Stack Exchange" &lt;do-not-reply@stackexchange.com&gt; To: --REDACTED-- Reply-To: do-not-reply@stackexchange.com Subject: Super User Weekly Newsletter - Friday, March 20, 2015 Date: Fri, 20 Mar 2015 17:14:30 +0000 Message-ID: &lt;2.9e47a33dae2ecd6e7599@NY-WEB01&gt; Content-Type: multipart/alternative;
36272
I am trying to use the MailManager class in Drupal 8 to send HTML mail. I got it working, but it isn't parsing the HTML markup. I think something is wrong with the headers of the email.  What I have is a custom module (Custom_forward) that contains a form and that calls Mailmanager::mail() in its submitForm() method, which contains the following code.          // Email body         $header = $sender . ' thought you would like to see this page from the website.';         $personal_message = $form_state-&gt;getValues()['message_body'];         $entity_url_value = '&lt;a href="' . $entity_url-&gt;toString() . '"&gt;Go to article&lt;/a&gt;';         $message = $header . '&lt;br&gt;' . $personal_message . '&lt;br&gt;' . $entity_url_value;          // Email         $langcode = 'en';         $mailManager = \Drupal::service('plugin.manager.mail');         $to = $form_state-&gt;getValues()['recipient'];          $params['title'] = 'Forward';         $params['message'] = $message;         $result = $mailManager-&gt;mail('custom_forward', 'forward', $to, $langcode, $params, NULL, true);          if ($result['result'] !== true) {             drupal_set_message(t('There was a problem sending your message and it was not sent.'), 'error');             \Drupal::logger('mail-log')-&gt;error($message);         }         else {             drupal_set_message(t('Your message has been sent.'));         }   According to Drupal you also need the hook_mail method in mytheme.theme to be able to send message, you can see this method here:  function custom_forward_mail($key, &amp;$message, $params) {   $message['body'] = [];   $message['subject'] = [];   $message['headers'] = array(     'content-type' =&gt; 'text/html',     'charset' =&gt; 'UTF-8',     'format' =&gt; 'flowed',     'delsp' =&gt; 'yes',     'from' =&gt; \Drupal::config('system.site')-&gt;get('mail')   );    switch ($key) {     case 'forward':       $message['subject'] = $params['title'];       $message['body'][] = '&lt;html&gt;&lt;body&gt;' . $params['message'] . '&lt;/body&gt;&lt;/html&gt;';       break;   } }   As you can see, I am setting the content type to text/html and that should tell the mail system to parse the content as an HTML, but this is not working for some reasons.  This is a testing email. All the HTML markup is not shown, but also not working.  Bassem thought you would like to see this page from the website. personal message Go to article [1] [1] http://myhost/node/81
94420
We seem to be getting A LOT of email spam, we have a combination of the email addresses as mailto links and contact forms that send to the same address.  What measures can we put in place that will eliminate the majority of spam?  We need to keep a visible email address and contact form so there's no way to just remove those.
40987
I send email from my server like this:  echo "This is the body of the email" | mail -s "This is the subject line" user@example.com   Noted that I replace user@example.com with a real email address. And it works. Just I need to know, where this nickname comes from?    I use ubuntu 14.04 on the server and I want to know how can I change that name?
10282
I am having an html email template which uses certain merge fields from a custom object. Now I am using following apex code to send certain emails to users.  Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();          mail.setTargetObjectId(t.OwnerId);          mail.setTemplateId(et.Id);         mail.setWhatId(t.Id);          mail.SaveAsActivity = false;         Messaging.sendEmail(new Messaging.singleemailMessage[] {mail});   Code is saved without error but when I run it it says "can't use whatId when sending email to users". Can anyone explain me how to overcome this error? When I use a visualforce template then same code works fine.
111739
I'm getting a lot of mail in my root user's mail account. This appears to be mostly reports and errors from things like cron scripts. I'm trying to work though and solve these things, possibly even have them be piped to some sort of "dashboard" - but until then how can I have these messages go to my personal e-mail account instead?
73
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?
26136
For about 2 days I'm trying to configure Ubuntu so that I can send an email, but when I type in:  echo "Subject: sendmail test" | sendmail -v my@email.com   I'll get:  postdrop: warning: unable to look up public/pickup: No such file or directory Mail Delivery Status Report will be mailed to &lt;andreigbr&gt;.   Even if I change my@email with mine, the inbox will be empty. Can somebody help me, please? I watched about 5 tutorial about how to send an email fom the command line but still doesn't work.
87724
What techniques are available for sending an email via a webpage or a form on a webpage?   I've got some background idea that you POST the form data to a script but I've don't really know what a cgi script is (I'd love to learn if this is the suggested method!) or what the current practice is.  This is just to provide some way for users to contact the operators. The in-page form seems like it would be easier on the user than ask them to open their mail client. I was also concerned about bots harvesting the contact email address (in the case of mailto: links).
23238
I subscribe to a few newsletters which are obviously using a third party service like MailChimp or Campaign Monitor to send their mails and I cannot find a way to create a rule that moves the newsletters into the appropriate folder that I have created.   All the newsletters follow a format that is structured like this:  Jared Spool &lt;jared.m.spool=uie.com@mail214.atl101.mcdlv.net&gt;; on behalf of; Jared Spool &lt;jared.m.spool@uie.com&gt;   The prolem with using the senders address for newsletters like this is that the full address that these mails are sent from seems to change quite regularly and the rule no longer works. If I try using "use specific words in the senders address" and then fill in the name, or the 'on-behalf of' email address, the rule does not work.  In most cases the subject lines don't follow a consistent format either, so I can't create a rule based on the subject line.  Does anyone have any ideas?
122485
I have been looking for some time looking for a way how can error SINGLE_EMAIL_LIMIT_EXCEEDED Email limit exceeded be avoided if I need to send one simple email to one single user, for example, myself.  15 Email invocations limit on Developer Edition is a very small number, and it is usually quickly exceeded. Using Workflow Email Alerts may help to send more emails but still it is limited.
32218
Using postfix, I'd like all incoming mail, to any address (including those that don't map to local users) to be piped to a script.  I've tried configuring mailbox_command in /etc/postfix/main.cf:  mailbox_command = /path/to/myscript.py   This works great if the user is a local user, but it fails for "unknown" users who don't have aliases.  I tried setting luser_relay to a local user, but this pre-empts mailbox_command, and so the command doesn't get run.  I tried setting local_recipient_maps= (empty string), but the message is still bounced (unknown user).  Is there a magic invocation I can use to get all known and unknown users to go to the script as well?  Full /etc/postfix/main.cf follows -- it's the default Ubuntu 10.04, with the exception of the mailbox_command line:  # See /usr/share/postfix/main.cf.dist for a commented, more complete version   # Debian specific:  Specifying a file name will cause the first # line of that file to be used as the name.  The Debian default # is /etc/mailname. #myorigin = /etc/mailname  smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no  # appending .domain is the MUA's job. append_dot_mydomain = no  # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h  readme_directory = no  # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache  # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client.  myhostname = ... snip ... alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = sassafras, ... snip ...,localhost.localdomain, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all  mailbox_command = /path/to/my/script.py