Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all 29734 articles
Browse latest View live

c# use search-mailbox clear user emailbox

$
0
0

I'm use below code to Operation exchange 2010 always prompts me to save PST. i don't know is there a problem with the parameters or a program error, How can i make it work, thanks.

        SecureString strRunasPassword = new SecureString();
        foreach (char x in "testpassword")
        {
            strRunasPassword.AppendChar(x);
        }
        try
        {
            PSCredential credentials = new PSCredential("testuser", strRunasPassword);
            var connInfo = new WSManConnectionInfo(new Uri("http://" + ExchangeIP + "/PowerShell"),
                "http://schemas.microsoft.com/powershell/Microsoft.Exchange", credentials);
            connInfo.AuthenticationMechanism = AuthenticationMechanism.Basic;
            var runspace = RunspaceFactory.CreateRunspace(connInfo);
            var command = new Command("Search-Mailbox");
            command.Parameters.Add("Identity", strIdentityName);
            command.Parameters.Add("DeleteContent");            
            command.Parameters.Add("Confirm", false);
            runspace.Open();
            var pipeline = runspace.CreatePipeline();
            pipeline.Commands.Add(command);
            pipeline.Invoke();
            runspace.Dispose();
            return null;
        }
        catch (Exception ex)
        {
            return ex.ToString();
        }

What is the difference between the mail packages "email.mime" and "email.message" and what is preferred option?

$
0
0

I've seen posts on Stackoverflow with code to send mails that imports the package email.mime and others that use email.message. Both are fairly similar, although I prefer the package email.message.

But, what is the difference after all? What is the preferred option for best results (speed, headers, spam filters, etc.?)

How Can i use bootstrap for email templates?

$
0
0

I am trying to make nice responsive emails and was wondering how i can include bootstrap to it. I am using mac mail app. I no there are a lot of third party app but i want to make my own template. So far i have been attaching html In email signature files but it doesnt have a head section for me to include bootstrap. Or even if not bootstrap what is the way to create responsive grids in email?

I have something like this:

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>[REPLACE THIS WITH YOUR TITLE]</title>
        <style media="all" type="text/css">
        [READ THE MINIFIED CSS FILE IN SEPARATELY AND INSERT IT HERE. YOU *CANNOT* JUST USE A CSS REFERENCE.]
    </style>
</head>
<body>
    <table cellspacing="0" cellpadding="0" border="0" width="100%">
        <tr>
            <td class="navbar navbar-inverse" align="center">
                <!-- This setup makes the nav background stretch the whole width of the screen. -->
                <table width="650px" cellspacing="0" cellpadding="3" class="container">
                    <tr class="navbar navbar-inverse">
                        <td colspan="4"><a class="brand" href="[YOUR WEB URL]">Bootstrap For Email</a></td>
                        <td><ul class="nav pull-right"><li><a href="[YOUR LOGIN URL]">Log On</a></li></ul></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td bgcolor="#FFFFFF" align="center">
                <table width="650px" cellspacing="0" cellpadding="3" class="container">
                    <tr>
                        <td>[BODY CONTENT GOES HERE]</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td bgcolor="#FFFFFF" align="center">
                <table width="650px" cellspacing="0" cellpadding="3" class="container">
                    <tr>
                        <td>
                            <hr>
                            <p>[PUT YOUR COPYRIGHT OR OTHER FOOTERY GOODNESS HERE]</p>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>

HTML email is not working in table format

$
0
0

I am using tabular format in HTML email content but its not working to send email. So can anyone let me know how to send table format email using PHP?

MailChimp does not accept an email ending in @usace.army.mil

$
0
0

When I do an http post to a list with an email ending in @usace.army.mil I get the error message back (that says the email is fake) I know the email is not fake is there anyway to override this?

:

 Invoke-RestMethod : {"type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Invalid 
Resource","status":400,"detail":"Fred.T.Tracy@usace.army.mil looks fake or invalid, please enter a real email address.","instance":""}
At line:69 char:29
+ ...     $gist = Invoke-RestMethod -Method Post -Uri "$URL$endpoint" -Head ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

How to automatically CC a message to specific recipient in exim

$
0
0

I need to make a configuration within exim that would automatically add a CC recipient whenever the message is sent to a specific TO recipient. All I could find is how to do this for BCC, but CCing seems to be done differently, I assume somewhere within PREROUTERS section. Would appreciate any help.

Sending Email via Java program

$
0
0

I am using the following code to send email using Java:

package com.company;

import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;

class SendEmail {
    public static void main(String[] args) {
        // Recipient's email ID needs to be mentioned.
        String to = "motse.thuto@gmail.com";

        // Sender's email ID needs to be mentioned
        String from = "web@gmail.com";

        // Assuming you are sending email from localhost
        String host = "localhost";

        // Get system properties
        Properties properties = System.getProperties();

        // Setup mail server
        properties.setProperty("mail.smtp.host", host);

        // Get the default Session object.
        Session session = Session.getDefaultInstance(properties);

        try {
            // Create a default MimeMessage object.
            MimeMessage message = new MimeMessage(session);

            // Set From: header field of the header.
            message.setFrom(new InternetAddress(from));

            // Set To: header field of the header.
            message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));

            // Set Subject: header field
            message.setSubject("This is the Subject Line!");

            // Now set the actual message
            message.setText("This is actual message");

            // Send message
            Transport.send(message);
            System.out.println("Sent message successfully....");
        } catch (MessagingException mex) {
            mex.printStackTrace();
        }
    }
}

It gives me the following error:

com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
      nested exception is:
        java.net.ConnectException: Connection refused: connect
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2209)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
        at javax.mail.Service.connect(Service.java:366)
        at javax.mail.Service.connect(Service.java:246)
        at javax.mail.Service.connect(Service.java:195)
        at javax.mail.Transport.send0(Transport.java:254)
        at javax.mail.Transport.send(Transport.java:124)
        at com.company.SendEmail.main(Main.java:47)

Process finished with exit code 0

Can anyone explain why I'm getting this error? Any help will be appreciated.

Sending an Email using gmail through Java

$
0
0

I am trying to send email through java using this code :

package send_email;
import java.util.Properties;  
import javax.mail.*;  
import javax.mail.internet.*;  
/**
 *
 * @author A
 */
public class Send_email {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        String host="smtp.gmail.com";  
  final String user="***@gmail.com";//change accordingly  
  final String password="****";//change accordingly  

  String to="*******@gmail.com";//change accordingly  

   //Get the session object  
   Properties props = new Properties();  
   props.put("mail.smtp.host",host);  
   props.put("mail.smtp.auth", "true");  

   Session session = Session.getDefaultInstance(props,  
    new javax.mail.Authenticator() {  
      protected PasswordAuthentication getPasswordAuthentication() {  
    return new PasswordAuthentication(user,password);  
      }  
    });  

   //Compose the message  
    try {  
     MimeMessage message = new MimeMessage(session);  
     message.setFrom(new InternetAddress(user));  
     message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));  
     message.setSubject("javatpoint");  
     message.setText("This is simple program of sending email using JavaMail API");  

    //send the message  
     Transport.send(message);  

     System.out.println("message sent successfully...");  

     } catch (MessagingException e) {e.printStackTrace();} 
    }

}

But I get the following error :

javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 25, response: 554
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1694)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
    at javax.mail.Service.connect(Service.java:313)
    at javax.mail.Service.connect(Service.java:172)
    at javax.mail.Service.connect(Service.java:121)
    at javax.mail.Transport.send0(Transport.java:190)
    at javax.mail.Transport.send(Transport.java:120)
    at send_email.Send_email.main(Send_email.java:48)
BUILD SUCCESSFUL (total time: 0 seconds)

I have allowed port 25 through firewall and then I have tested it using telnet " telnet smtp.gmail.com 25 " but I get this error 554 OutgoingFilter "You are temporarily deferred due to sending spam or virus pl ease contact 16333 for more information"

So how do I fix this error?


How do I fix the error "The type initializer for '?' threw an exception." when sending e-mails through C# with EASendMail?

$
0
0

I have been working on this project to send an e-mail to a user and I have had an error come up all the time. (I'm using the EASendMail NuGet package) It is "The type initializer for '?' threw an exception." (this is in the console for the error system that the package has) I dont really know what that means, my code is this:

using EASendMail;

namespace Email
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                SmtpMail oMail = new SmtpMail("TryIt");

                // Set sender email address, please change it to yours
                oMail.From = "Splat2ooner@gmail.com";
                // Set recipient email address, please change it to yours
                oMail.To = "Splat2ooner@gmail.com";

                // Set email subject
                oMail.Subject = "test email from c# project";
                // Set email body
                oMail.TextBody = "this is a test email sent from c# project, do not reply";

                // SMTP server address
                SmtpServer oServer = new SmtpServer("smtp.gmail.com");

                // User and password for ESMTP authentication
                oServer.User = "Splat2ooner@gmail.com";
                oServer.Password = "password (not my passoword)";

                // Most mordern SMTP servers require SSL/TLS connection now.
                // ConnectTryTLS means if server supports SSL/TLS, SSL/TLS will be used automatically.
                oServer.ConnectType = SmtpConnectType.ConnectTryTLS;

                // If your SMTP server uses 587 port
                //oServer.Port = 587;

                // If your SMTP server requires SSL/TLS connection on 25/587/465 port
                //oServer.Port = 25; // 25 or 587 or 465
                oServer.ConnectType = SmtpConnectType.ConnectSSLAuto;

                Console.WriteLine("start to send email ...");

                SmtpClient oSmtp = new SmtpClient();
                oSmtp.SendMail(oServer, oMail);

                Console.WriteLine("email was sent successfully!");
            }
            catch (Exception ep)
            {
                Console.WriteLine("failed to send email with the following error:");
                Console.WriteLine(ep.Message);
            }
        }
    }
}

Thanks.

How to send email automatically using task scheduler using PHP and mysql?

$
0
0

I want to send a reminder email to perticular email id.Reminder date and time are stored in mysql database.When reminder date and time = current date and time, that time i need to send a email that says You have new reminder with tha remarks(remarks is the database column).How to do this plz help me.

I am using windows8 need to use Task scheduler. by giving the script/program

Sending Outlook Email With Attachment Through VBA

$
0
0

I would like a macro to email a report through Outlook after it has finished.

I am testing this with my own and coworker's email addresses and I am getting an "Undeliverable"Error.

The message says the recipient cannot be reached and suggests trying to send the email later.

I would greatly appreciate it if the community would take a look at the code I have produced so far and let me know if it is my code or maybe the system that is causing the error. (I have a strong feeling it is the code!)

Sub CreateEmail()

Dim OlApp As Object
Dim OlMail As Object
Dim ToRecipient As Variant
Dim CcRecipient As Variant

Set OlApp = CreateObject("Outlook.Application")
Set OlMail = OlApp.createitem(olmailitem)

For Each ToRecipient In Array("jon.doe@aol.com")
    OlMail.Recipients.Add ToRecipient
Next ToRecipient

For Each CcRecipient In Array("jon.doe@aol.com")
    With OlMail.Recipients.Add(CcRecipient)
        .Type = olCC
    End With
Next CcRecipient

'Fill in Subject field
OlMail.Subject = "Open Payable Receivable"'Add the report as an attachment

OlMail.Attachments.Add ("C:\OpenPayRecPrint2.pdf")

'Send Message

OlMail.Send

End Sub

Python Outlook handle emails that were recalled by sender

$
0
0

I'm currently writing a script in Python 2.7 which iterates through emails in an outlook folder, retrieves The email senders and saves the emails to a folder on the local machine. There's a problem however when the email has been recalled by the sender, an error occurs and the script doesn't work. Here's the bit of code that causes an error:

    if message.Class == 43:
        if message.SenderEmailType == 'EX':
            Sender = message.Sender.GetExchangeUser().PrimarySmtpAddress
        else:
            Sender = message.SenderEmailAddress

and the error:

if message.SenderEmailType == 'EX': File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 516, in getattr ret = self.oleobj.Invoke(retEntry.dispid,0,invoke_type,1) pywintypes.com_error: (-2147467262, 'No such interface supported', None, None)

the question is, how do i handle such objects where the email has been recalled by the sender? I have to either skip them or move them to a different folder but message.Move doesnt work either on recalled emails (same error, no such interface supported).

whole code:

import os
import win32com.client
import itertools
import shutil


OlSaveAsType = {
    "olTXT": 0,
    "olRTF": 1,
    "olTemplate": 2,
    "olMSG": 3,
    "olDoc": 4,
    "olHTML": 5,
    "olVCard": 6,
    "olVCal": 7,
    "olICal": 8
}

outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
folder = outlook.Folders("MyFolder")
inbox = folder.Folders("Inbox")
Checked = inbox.Folders("Checked")
Sent = inbox.Folders("Sent")


messages = Checked.Items
a = (len(messages))
message = messages.GetFirst()
id = 1


for _ in itertools.repeat(None, a):

    messages = Checked.Items
    message = messages.GetFirst()
    Subject = message.subject

    if message.Class == 43:
        if message.SenderEmailType == 'EX':
            Sender = message.Sender.GetExchangeUser().PrimarySmtpAddress
        else:
            Sender = message.SenderEmailAddress

    message.SaveAs(newpath + '\\' + Sender + "" + str(id) + ".msg", OlSaveAsType['olMSG'])
    id = int(id)
    id += 1
    message.Move(Sent)
    if id == 600:
        break
    message = messages.GetNext()

Django LDAP email as Username

$
0
0

I am trying to login as a LDAP-user with an e-mail adress. I used the following code:

settings.py

AUTH_LDAP_SERVER_URI = "ldap://192.168.12.123"

AUTH_LDAP_BIND_DN = "User"
AUTH_LDAP_BIND_PASSWORD = "Password"
AUTH_LDAP_CONNECTION_OPTIONS = {
    ldap.OPT_DEBUG_LEVEL: 1,
    ldap.OPT_REFERRALS: 0
}

AUTH_LDAP_USER_SEARCH = LDAPSearch("DC=domain,DC=com", ldap.SCOPE_ONELEVEL, "(uid=%(user)s)")
AUTH_LDAP_GROUP_SEARCH = LDAPSearch("DC=domain,DC=com", ldap.SCOPE_SUBTREE, "(objectClass=group)")
AUTH_LDAP_GROUP_TYPE = NestedActiveDirectoryGroupType()

AUTH_LDAP_USER_ATTR_MAP = {
    "first_name": "givenName",
    "last_name": "sn",
    "email": "mail"
}

AUTH_LDAP_ALWAYS_UPDATE_USER = True

LDAP_AUTH_OBJECT_CLASS = "inetOrgPerson"

AUTH_LDAP_FIND_GROUP_PERMS = True

AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600

AUTH_LDAP_E_USER_SEARCH = LDAPSearch("DC=domain,DC=com", ldap.SCOPE_SUBTREE, ldap.SCOPE_ONELEVEL, "(mail=%(user)s)")
AUTH_LDAP_E_USER_ATTR_MAP = AUTH_LDAP_USER_ATTR_MAP
AUTH_LDAP_E_ALWAYS_UPDATE_USER = AUTH_LDAP_ALWAYS_UPDATE_USER

AUTHENTICATION_BACKENDS = (
    'django_auth_ldap.backend.LDAPBackend',
    #'django.contrib.auth.backends.ModelBackend',
    'accounts.backends.LDAPEmailBackend',
)

backends.py

from django_auth_ldap.backend import LDAPBackend, _LDAPUser

class LDAPEmailBackend(LDAPBackend):
    settings_prefix = "AUTH_LDAP_E_"

    def get_or_create_user(self, email, ldap_user):

    model = self.get_user_model()
    username_field = getattr(model, 'USERNAME_FIELD', 'username')

    kwargs = {
        username_field + '__iexact': ldap_user.attrs['uid'][0],
        'defaults': {
         username_field: ldap_user.attrs['uid'][0].lower(),
         'email': email
        }
    }

    return model.objects.get_or_create(**kwargs)

The console gives me this:

search_s('DC=sbvg,DC=ch', 1, '(uid=%(user)s)') returned 0 objects: Authentication failed for ipa@sbvg.ch: failed to map the username to a DN. Caught LDAPError while authenticating ipa@sbvg.ch: SERVER_DOWN({'desc': u"Can't contact LDAP server"},)

If you have any idea, do not hesitate to post it.

Displaying PHP variables in an email

$
0
0

I am trying to display a users first and last name at the end of an email message. The $firstname and $lastname are stored as session variables. This is the code:

//get user info from SESSION
$firstname = $_SESSION['firstname'];
$lastname = $_SESSION['lastname'];
$email = $_SESSION['email'];

//get mail function data
$case = $_POST['case'];
$to = addslashes(strip_tags($_POST['to']));
$subject = addslashes(strip_tags($_POST['subject']));
$from = "confirmation@domain.com";
$headers = "From: $from\r\n";
$message = 

"
Thanks!

$firstname $lastname
$email

";

firstname, lastname and email are all blank in the message. Any ideas?

Mail function:

//send email
        if (mail($to, $subject, $message, $headers, "-f".$from)){
            //register into database
            $register_email = mysql_query 
            ("INSERT INTO `email` VALUES ('','$case','$userid','$to','$from','$subject','$message','$sent','$read','')");
            //formatting for error message
            $emailSent = "block";
            $emailFailed = "none";
        }
        else //if the email fails to send
        {
            $emailSent = "none";
            $emailFailed = "block";
        }
?>

Currency localization in klaviyo email template

$
0
0

I'm creating a abandoned cart email in klaviyo.

And because I'm from Europe, I need the currency as "€" and not in USD$.

This is the standard code of the product recommendation and it looks like this.

Code in the picture:

> {{ item.product.title }} Quantity: {{ item.quantity|floatformat:0 }} —
> Total: {% currency_format item.line_price|floatformat:2 %}

But I need instead of the following / this:

Instead Quantity = Menge

Instead $ = €

Instead Total = Gesamt

I tried to replace the 'currency_format' with 'Euro' but it didn't work.

Could anyone be helpful on this topic as I am a noob in terms of programming and HTML.

I thank you in advance.


PHPMailer Configuration - Every time I get success message, but email is not sent at all [duplicate]

$
0
0

This question already has an answer here:

PHPMailer.php

 /**   * SMTP hosts.
 * Either a single hostname or multiple semicolon-delimited hostnames.
 * You can also specify a different port
 * for each host by using this format: [hostname:port]
 * (e.g. "smtp1.example.com:25;smtp2.example.com").
 * You can also specify encryption type, for example:
 * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465").
 * Hosts will be tried in order.
 *
 * @var string
 */
public $Host = 'smtp.umbler.com';

/**
 * The default SMTP server port.
 *
 * @var int
 */
public $Port = 587;

/**
 * The SMTP HELO of the message.
 * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find
 * one with the same method described above for $Hostname.
 *
 * @see PHPMailer::$Hostname
 *
 * @var string
 */
public $Helo = 'publicamente.com.br';

/**
 * What kind of encryption to use on the SMTP connection.
 * Options: '', 'ssl' or 'tls'.
 *
 * @var string
 */
public $SMTPSecure = 'ssl';

/**
 * Whether to enable TLS encryption automatically if a server supports it,
 * even if `SMTPSecure` is not set to 'tls'.
 * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid.
 *
 * @var bool
 */
public $SMTPAutoTLS = true;

/**
 * Whether to use SMTP authentication.
 * Uses the Username and Password properties.
 *
 * @see PHPMailer::$Username
 * @see PHPMailer::$Password
 *
 * @var bool
 */
public $SMTPAuth = true;

/**
 * Options array passed to stream_context_create when connecting via SMTP.
 *
 * @var array
 */
public $SMTPOptions = [];

/**
 * SMTP username.
 *
 * @var string
 */
public $Username = 'example@email.com';

/**
 * SMTP password.
 *
 * @var string
 */
public $Password = 'example_password';

/**
 * SMTP auth type.
 * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified.
 *
 * @var string
 */
public $AuthType = '';

/**
 * An instance of the PHPMailer OAuth class.
 *
 * @var OAuth
 */
protected $oauth;

Set this config, but have no idea why it's not working (Changed real credentials to examples)

sendmail.php

<?php

$settings = array(
    "name"          => "Name",
    "email"         => "example@domain.com",
);

require_once "phpmailer/contact_form.php";

contact_form.php

<?php

// Class
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\PHPMailer;

// Validate
if ( isset( $_POST[ 'email' ] ) || array_key_exists( 'email', $_POST ) ) :

    // Message Settings
    $message = array(
        'name'          => $_POST[ 'name' ],
        'email'         => $_POST[ 'email' ],
        'company'       => $_POST[ 'company' ],
        'phone'         => $_POST[ 'phone' ],
        'message'       => $_POST[ 'message' ],
        'body'          => '',
        "alerts"        => array(
            "error"         => 'Sua mensagem não pode ser enviada, tente novamente.',
            "success"       => 'Obrigado! A sua mensagem foi enviada com sucesso.',
        ),
    );

    $message[ 'body' ] .= '<b>Nome:</b> ' . $message[ 'name' ];
    $message[ 'body' ] .= '<br><b>Email:</b> ' . $message[ 'email' ];
    $message[ 'body' ] .= '<br><b>Empresa:</b> ' . $message[ 'company' ];
    $message[ 'body' ] .= '<br><b>telefone:</b> ' . $message[ 'Phone' ];
    $message[ 'body' ] .= '<br><br><b>Mensagem:</b><br>' . $message[ 'message' ];

    // Include
    require 'phpmailer/Exception.php';
    require 'phpmailer/PHPMailer.php';

    $mail = new PHPMailer( true );

    try {
        // Recipients
        $mail->AddReplyTo( $message[ 'email' ], $message[ 'name' ] );
        $mail->setFrom( 'admin@'. $_SERVER['SERVER_NAME'], $message[ 'name' ] );
        $mail->addAddress( $settings[ 'email' ], $settings[ 'name' ] );

        // Content
        $mail->isHTML( true );
        $mail->Subject = $message[ 'subject' ];
        $mail->Body    = $message[ 'body' ];

        // Send
        $mail->send();

        // Success
        echo '["success", "'. $message[ 'alerts' ][ 'success' ] .'"]';
    } catch ( Exception $e ) {
        // Error
        echo '["error", "'. $message[ 'alerts' ][ 'error' ] .'"]';
    }

endif;

I've tried to use $mail setting STMP and all credentials here in this file, but nothing happend, no output message

It is already taken from template, I thought that is more useful than just put $mail, but I don't know how to use it.

I'm trying to undestand reading those comments, but I'm not having success with it.

Laravel Beautymail: I want to route all emails to a database table for subsequent sending by a daemon ... how best?

$
0
0

I have a Laravel application which of course uses Beautymail to send e-mails, and what I'd like to do is to divert those emails into a database table instead. Then, periodically, a daemon would run some command to actually send the emails.

I feel like this ought to be a fairly common requirement and so there should be some "elegant" way to do it. Hence, does anyone out there have any suggestions and/or an example that I could follow? ("Do Not Do A Thing Already Done ...")

P.S.: Yes, I know about "mail queueing" from the documentation, of course, but I guess what I'd really like to be pointed to are some actual, working examples (e.g. Github?) of ready-to-copy code that's already doing this ... sending the e-mail to an SQL table, sending from that table ... as much "I don't have to re-invent this stuff" stuff that anyone can very-helpfully point me to.

how do i email form submissions through url's

$
0
0

I would like to set up a form on my Shopify website. I want the content of the form to be sent to me via email. So I would like to use the get method and set the forms action attribute to a URL that will send me an email with the submissions. The question is, how do I send an email through URL's? Or do I need to use API for this? Is it possible at all? Or is it gonna be possible for me to submit the form to a mystore.myshopify.com page? I have already tried searching some similar questions, but nothing was satisfying.

SSIS send email task is not working what am i doing wrong?

$
0
0

I am simply trying to send an email when the process is done running.

I have a simple CSV file transferring to CSV file and I have a send email task with the server name smtp.gmail.com and the port option is not there.

I have inputted all the information and getting this error when I run the whole package.

The error is this:

Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: "Failure sending mail. System.Net.WebException: Unable to connect to the remote server System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.195.109:25". Task failed: Send Mail Task

How can I fix my SSL error while I try to send a mail with symfony 5?

$
0
0

I'm currently trying to send emails with symfony 5 (should be the same as Symfony 4) through gmail but I can't send any. I tried to use the SwiftMailer component but it does nothing (tried tls and ssl). After that, I found that there was a mailer component in symfony (https://symfony.com/doc/current/components/mailer.html), I tried to setup it but this time I got the following error :

Connection could not be established with host "ssl://smtp.gmail.com:465": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.

I tried then to add a certificate to openssl in my php.ini but it doesn't work. I also tried the swiftmailer:email:send command and I got the following error :

Exception occurred while flushing email queue: Connection could not be established with host smtp.gmail.com :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

---- EDIT ----
It appear to work using the following configuration for the swiftmailer.yaml file and nothing in .env file :

swiftmailer:
    transport:        gmail
    username:         m*******@gmail.com
    password:         ***********
    host:             localhost
    port:             465
    encryption:       tls
    auth-mode:        login
    spool: { type: 'memory' }
    stream_options:
        ssl:
            allow_self_signed: true
            verify_peer: false
            verify_peer_name: false

Viewing all 29734 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>