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

SAS Processes are not sending mails

$
0
0

I have a lot of processes that are sending a e-mail with logs/info. I've changed my SMTP SAS server configuration on sas.cfg After that, i am not receving mails, even jobs don't have errors after macro with e-mail sending.

When I am processing code fragment in SAS Enterprise Guide which is sending that e-mails it works. proc options group=mail; is receving a new SMTP server.


Send single email with values from all new rows in a spreadsheet (Google Script / GAS)

$
0
0

Thanks to lots of reading on this site, I successfully built a script that does what I wanted it to do: Upon running, the script sends an individual email for each new row in a spreadsheet, then mark that row "sent." Yay!

But now I need the script to compile all the rows into multiple sections in a single email. So, I need the script to check for new rows, use a template to add the values from each new row into an individual section, compile all the new sections into an email, send the email, then mark all new rows "sent".

I'm stuck because it seems that I would need to have each newly added row define a relative variable, i.e. first unsent row = sectionOne, second = sectionTwo, etc. But the length of the email and the number of variables to define would depend on the number of new rows. So I don't really know how to get the script to go through a loop and add only (but all of) the new content to the email body.

Here's what I have, anyone know how to get to the goal here?

function sendEmail() {

 //setup function
 var ActiveSheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
 var StartRow = 3;
 var RowRange = ActiveSheet.getLastRow() - StartRow + 1;
 var WholeRange = ActiveSheet.getRange(StartRow,1,RowRange,11);
 var AllValues = WholeRange.getValues();

 //iterate loop
 for (i in AllValues) {

 //set current row
 var CurrentRow = AllValues[i];

 //set subject line
 var Subject = "Found by " + CurrentRow[1];

 //set HTML template for information
 var message = 
      "<p><b>Title: </b>" + CurrentRow[2] + "</p>" +
      "<p><b>Agency: </b>" + CurrentRow[3] + "</p>" +
      "<p><b>Summary: </b>" + CurrentRow[4] + "</p>" +
      "<p><b>Due: </b>" + CurrentRow[5] + "</p>" +
      "<p><b>Posted: </b>" + CurrentRow[6] + "</p>" +
      "<p><b>Total Funding: </b>" + CurrentRow[7] + "</p>" +
      "<p><b>Announcement Number: </b>" + CurrentRow[8] + "</p>" +
      "<p><b>Useful Links: </b>" + CurrentRow[9] + "</p>";

 //define column to check if sent
 var EmailSent = CurrentRow[11];

 //define who to send grants to 
 var SendTo = "emailaddress1@gmail.com" + "," + "emailaddress2@gmail.com";

 //if row has not been sent, then...  
 if (emailsent != "sent") {

  //set the row to look at
  var setRow = parseInt(i) + startRow;

  //mark row as "sent"
  ActiveSheet.getRange(setRow, 11).setValue("sent");

  //send the actual email  
  MailApp.sendEmail({
      to: SendTo,
      cc: "",
      subject: subject,
      htmlBody: message,
});
}
}
}

How to send an email with multiple inline attachments to outlook email accounts using python?

$
0
0

I have been using 'from email.mime.multipart import MIMEMultipart and from email.mime.text import MIMEText' libraries to send automated mails using python to gmail accounts . These emails consists of html based images which were going as inline attachments as required. Now that the accounts I want to send my emails to have shifted to Outlook, all my MIMEtext parts which I am sending using msg.attach are coming as attachments(except the first attached part) instead of required inline version. Please guide me with the same. Solution while using the same library would be appreciable.

Laravel Validation Email address

$
0
0

I have created an edit form in my laravel application form which accepts an email address.

I have used Laravel validation on the server-side.

It is validating email address correctly when I pass email without @.

But the problem is when I remove . (dot) from the email address, it accepts it as a valid email address.

Please provide suggestions why is it happening like that.

how to reject mail with suspicious binary fail using pyhton

$
0
0

I need to implement a kind of mail anti virus using python. I can use any kind of mail server (sendmail / postfix). I need to write a code that checks any binary file that attached to the mail and checks if the signature is a virus. I know how to make the checking code, I just don't know how to connect the mail to pyhton or how to use those mail servers.

How can I do that? thanks a lot!

Send ics file RSVP format not working properly using Outlook smtp server?

$
0
0

I have a code that works well when using gmail smtp server with my personal credentials :

fun sendEventInvitation(from: Profile, to: Profile, meetup: Meetup) {
    val message: MimeMessage = emailSender.createMimeMessage()

    message.setFrom(InternetAddress("foo1@foo1.com"))
    message.setRecipient(Message.RecipientType.TO, InternetAddress("foo2@foo2.com"))
    message.subject = "foo"

    val messageBodyEvent = MimeBodyPart()
    val id = UUID.randomUUID().toString()
    val eventIcs = formatCalendarFile(id, from, to, meetup)
    messageBodyEvent.dataHandler = DataHandler(ByteArrayDataSource(eventIcs, "text/calendar; charset=\"utf-8\"; method=REQUEST"))
    messageBodyEvent.setHeader("Content-Transfer-Encoding", "base64")

    val multiPart = MimeMultipart()
    multiPart.addBodyPart(messageBodyEvent)

    message.setContent(multiPart)

    emailSender.send(message)
}

eventIcs is basically a String of an iCal correct format.

But whenever I switch to the outlook server using company's credentials, It gives the following error :

554 5.2.0 STOREDRV.Submission.Exception:InvalidRecipientsException; Failed to process message due to a permanent exception with message A message can't be sent because it contains no recipients. InvalidRecipientsException: A message can't be sent because it contains no recipients. [Hostname=AM6PR01MB5011.eurprd01.prod.exchangelabs.com]
DEBUG SMTP: got response code 554, with response: 554 5.2.0 STOREDRV.Submission.Exception:InvalidRecipientsException; Failed to process message due to a permanent exception with message A message can't be sent because it contains no recipients. InvalidRecipientsException: A message can't be sent because it contains no recipients. [Hostname=AM6PR01MB5011.eurprd01.prod.exchangelabs.com]

Now, weirdly enough, when I remove the method=REQUEST attachment header :

messageBodyEvent.dataHandler = DataHandler(ByteArrayDataSource(eventIcs, "text/calendar; charset=\"utf-8\"))

It works but because there's not this header, the ICS isn't well recognized by Outlook client and doesn't display RSVP options to the recipients as explained here.

I tried to send an invitation from Thunderbird using the same credentials and it works. So it's not link to rules whatsoever.

Here is the complete debug output :

DEBUG: JavaMail version 1.6.1
DEBUG: URL jar:file:/Users/baptistearnaud/.m2/repository/com/amazonaws/aws-java-sdk-ses/1.11.373/aws-java-sdk-ses-1.11.373.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/Users/baptistearnaud/.m2/repository/com/amazonaws/aws-java-sdk-ses/1.11.373/aws-java-sdk-ses-1.11.373.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], com.amazonaws.services.simpleemail.AWSJavaMailTransport=javax.mail.Provider[TRANSPORT,aws,com.amazonaws.services.simpleemail.AWSJavaMailTransport,Amazon Web Services LLC]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], aws=javax.mail.Provider[TRANSPORT,aws,com.amazonaws.services.simpleemail.AWSJavaMailTransport,Amazon Web Services LLC]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.office365.com", port 587, isSSL false
220 LO2P265CA0439.outlook.office365.com Microsoft ESMTP MAIL Service ready at Wed, 21 Nov 2018 11:01:22 +0000
DEBUG SMTP: connected to host "smtp.office365.com", port: 587
EHLO mbp-de-baptiste.lan
250-LO2P265CA0439.outlook.office365.com Hello [89.227.204.114]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
DEBUG SMTP: Found extension "SIZE", arg "157286400"
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "SMTPUTF8", arg ""
STARTTLS
220 2.0.0 SMTP server ready
EHLO mbp-de-baptiste.lan
250-LO2P265CA0439.outlook.office365.com Hello [89.227.204.114]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN XOAUTH2
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
DEBUG SMTP: Found extension "SIZE", arg "157286400"
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN XOAUTH2"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "SMTPUTF8", arg ""
DEBUG SMTP: protocolConnect login, host=smtp.office365.com, user=SVC_ToGazer@uccint.onmicrosoft.com, password=<non-null>
DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM XOAUTH2 
DEBUG SMTP: Using mechanism LOGIN
DEBUG SMTP: AUTH LOGIN command trace suppressed
DEBUG SMTP: AUTH LOGIN succeeded
DEBUG SMTP: use8bit false
MAIL FROM:<foo1@foo1.com>
250 2.1.0 Sender OK
RCPT TO:<foo2@foo2.com>
250 2.1.5 Recipient OK
DEBUG SMTP: Verified Addresses
DEBUG SMTP:   foo2@foo2.com
DATA
354 Start mail input; end with <CRLF>.<CRLF>
Date: Wed, 21 Nov 2018 11:00:41 +0000 (UTC)
From: foo1@foo1.com
To: foo2@foo2.com
Message-ID: <681000169.0.1542798041668@mbp-de-baptiste.lan>
Subject: FOO
MIME-Version: 1.0
Content-Type: multipart/mixed; 
    boundary="----=_Part_1_1921144901.1542798041673"

------=_Part_1_1921144901.1542798041673
Content-Type: text/calendar; charset="utf-8"; method=REQUEST
Content-Transfer-Encoding: base64

QkVHSU46VkNBTEVOREFSClZFUlNJT046Mi4wClBST0RJRDotLy9HUlRnYXogQ29ycG9yYXRpb24v
L05PTlNHTUwgVG9nYXonZXIvL0ZSCk1FVEhPRDpSRVFVRVNUCkJFR0lOOlZFVkVOVApVSUQ6YTQ5
ODVkZjUtNzI1YS00NTA0LTgzNWYtZDhkNTU2ZjliMDIzQHRvZ2F6ZXIuY29tCkRUU1RBTVA6MjAx
ODExMjlUMTgwMDAwWgpPUkdBTklaRVI7Q049dG9nYXplckBpbnQuZ3J0Z2F6LmV1Om1haWx0bzp0
b2dhemVyQGludC5ncnRnYXouZXUKQVRURU5ERUU7Q1VUWVBFPUlORElWSURVQUw7Uk9MRT1SRVEt
UEFSVElDSVBBTlQ7ClBBUlRTVEFUPU5FRURTLUFDVElPTjtSU1ZQPVRSVUU7Q049QmFwdGlzdGUg
QXJuYXVkOwpYLU5VTS1HVUVTVFM9MDptYWlsdG86YmFwdF9pczJAaG90bWFpbC5jb20KRFRTVEFS
VDoyMDE4MTEyOVQxODAwMDAKRFRFTkQ6MjAxODExMjlUMjIwMDAwClNVTU1BUlk6QWZ0ZXJ3b3Jr
IGdheidwYWNobwpMT0NBVElPTjpQYXJpcyA4ZSBhcnIKREVTQ1JJUFRJT046QWZ0ZXJ3b3JrIG/D
uSBsJ29uIHZhIGTDqWd1c3RlciBkdSBib24gZ2FzcGFjaG8uIEonZXNww6hyZSBxdWUgbGUgamV1
IGRlIG1vdCB2b3VzIHBsYcOudC4uLiBFeGNlbGxlbnQhCkVORDpWRVZFTlQKRU5EOlZDQUxFTkRB
Ugo=
------=_Part_1_1921144901.1542798041673--
.
554 5.2.0 STOREDRV.Submission.Exception:InvalidRecipientsException; Failed to process message due to a permanent exception with message A message can't be sent because it contains no recipients. InvalidRecipientsException: A message can't be sent because it contains no recipients. [Hostname=AM6PR01MB5011.eurprd01.prod.exchangelabs.com]
DEBUG SMTP: got response code 554, with response: 554 5.2.0 STOREDRV.Submission.Exception:InvalidRecipientsException; Failed to process message due to a permanent exception with message A message can't be sent because it contains no recipients. InvalidRecipientsException: A message can't be sent because it contains no recipients. [Hostname=AM6PR01MB5011.eurprd01.prod.exchangelabs.com]

RSET
250 2.0.0 Resetting
DEBUG SMTP: MessagingException while sending, THROW: 
com.sun.mail.smtp.SMTPSendFailedException: 554 5.2.0 STOREDRV.Submission.Exception:InvalidRecipientsException; Failed to process message due to a permanent exception with message A message can't be sent because it contains no recipients. InvalidRecipientsException: A message can't be sent because it contains no recipients. [Hostname=AM6PR01MB5011.eurprd01.prod.exchangelabs.com]

Any ideas why there is this behavior ?

I have two mailto links in my email template and would like to have two different colors on it.(Blue & White)

$
0
0
a[href^="mailto:"]

{ 

  color: blue;

}


I am using the above code and it's getting applied to both mailto links. Is there any way that we can have two different colors for mailto link? tried SPAN class but not working in Outlook.

Email link URL character limits?

$
0
0

We're seeing an issue where customers click on a Create Account link which we send them via email, but then they're seeing the Sign In page instead (which causes issues because customers then can't create an account and access some documents).

We're unable to reproduce it internally, but know it's happening in the real world because of customer complaints and Kibana events.

It seems to affect devices only, and with various combinations of email clients and web browsers. For example, a customer with an iPhone running iOS 12.4 with the Outlook app and Safari 12.1 came across this issue... but then it worked on Windows desktop as expected - using the exact same link from the same email.

We've also seen it happen with Android 9.0 with Chrome 77.x, although I'm not sure of the email client used.

So, a couple questions:

  • Could the email client be cutting off part of the link address when the customer clicks through, so redirecting people to sign-in? (that's expected functionality if the token contained within the URL is invalid for some reason).
  • Are there URL link character limits in emails or email clients?

The link is (roughly) 300 characters, which is nowhere near the browser limits, so I suspect the issue stems from the email client itself - but I can't find anything online that would support this theory.

Any help would be appreciated!


AWS lambda unable to send smtp email

$
0
0

I have a simple AWS lambda request handler running that sends an email using smtp. When I put this code into a local main() function, it runs well and sends the email. When running on aws, I keep getting the following javax.mail.MessagingException: 501 Syntax: HELO <hostname> error. Is there something that needs to be changed in AWS for the mail to go through? Here is my code:

Properties mailProps = new Properties();
mailProps.setProperty("mail.smtp.host", amazonSTMPHost);
mailProps.setProperty("mail.smtp.port", port);
mailProps.setProperty("mail.smtp.user", user);
mailProps.setProperty("mail.smtp.auth", "true");
PasswordAuthentication auth = new PasswordAuthentication(user, password);
mailSession = Session.getInstance(mailProps, new Authenticator() {
    @Override
    protected PasswordAuthentication getPasswordAuthentication() {
        return auth;
    }
});

String toAddress = "example@example.com";

try{
    MimeMessage message = new MimeMessage(mailSession);
    message.setFrom(new InternetAddress("noreply@example.com", "Example"));
    message.addRecipient(javax.mail.Message.RecipientType.TO, new InternetAddress(toAddress));
    message.setSubject("test subject");
    message.setContent("content content","text/html; charset=utf-8");

    System.out.println("Sending email to" + toAddress);

    Transport.send(message);
}
catch(Exception e){
    e.printStackTrace();
    System.out.println("Failed to send email");
} 

Running outlook interlop by an application started with process.start

$
0
0

I know title is a little confusing. So my main problem is this:

I have an application which updates an another app.And after update function ends it starts the other app with process.start method

Process.Start(@"C:\Program Files (x86)\XMLMailService\XMLMailWF.exe");

and this second updated program sends a mail with simple outlook interlop

Microsoft.Office.Interop.Outlook.Application OutlookObject = new Microsoft.Office.Interop.Outlook.Application();
                Microsoft.Office.Interop.Outlook.MailItem MailObject = (Microsoft.Office.Interop.Outlook.MailItem)(OutlookObject.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem));
                MailObject.To = txtkime.Text;
                MailObject.Subject = psubj;
                MailObject.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceNormal;
                MailObject.HTMLBody = pbody;
                MailObject.Attachments.Add(pdfyolu);
                MailObject.Send();

Actually problem is not code related. But outlook code works like a charm when i start the app with double click. But gives me this error.

So why outlook interlop gives error when app starts with process.start.

Edit: Error translation=>

Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).

Problems with reciving emails [duplicate]

$
0
0

This question already has an answer here:

I do not receive mail from my WordPress site. I used contact form 7, properly set SMTP configuration settings (set From Email Address just like my domain), and when try to test email everything looks good, i've got this message "Test email was successfully sent" and i recive test mail in inbox. But when I fill out the form on the site and click submit I don't get any mail.

http://prntscr.com/pta45f

Trigger countdown timer in email from the time it is sent, automatically

$
0
0

I am looking for a way where I can integrate a countdown timer in the email. This timer should last for one week from the time email is sent. The trick here is that the timer should start automatically once the email is sent and should expire exactly in a week after receiving in the inbox, so this can be integrated in automated email campaigns. Pre-defined timers with specified start/end date is of no use.

Use of undeclared type 'TLSMode' in a SPM (swift package manager)

$
0
0

I have included an SPM (Swift Package Manager) package, called Swift-SMTP in my project. This is used to send emails from my email to another through a SMTP connection. After the installation and usage in the parameters of SMTP struct I get this error:

"Use of undeclared type 'TLSMode'"

TLSMode is a public enum with four cases normal, ignoreTLS, requireTLS, requireSTARTTLS. When I use this in the view controller where I have to implement it, it shows the error.

public init(hostname: String,
        email: String,
        password: String,
        port: Int32 = 587,
        tlsMode: TLSMode = .requireSTARTTLS,
        tlsConfiguration: TLSConfiguration? = nil,
        authMethods: [AuthMethod] = [],
        domainName: String = "localhost",
        timeout: UInt = 10)

How to declare type TLSMode?

Outlook PHP mail function sends to junk [duplicate]

$
0
0
<?php

$fname = trim($_POST['fname']);
$email = trim($_POST['email']);
$phone = (isset($_POST['phone']))?trim($_POST['phone']):'';
$website = trim($_POST['website']);
$_message = trim($_POST['message']);


if ($fname == "") {
    $msg['err'] = "\n First name can not be empty!";
    $msg['field'] = "fname";
    $msg['code'] = FALSE;
} else if ($email == "") {
    $msg['err'] = "\n Email can not be empty!";
    $msg['field'] = "Email";
    $msg['field'] = "email";
    $msg['code'] = FALSE;
} else if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
    $msg['err'] = "\n Please put a valid email address!";
    $msg['field'] = "email";
    $msg['code'] = FALSE;
} else if ($phone == "") {
    if(isset($_POST['phone'])){
        $msg['err'] = "\n Phone number can not be empty!";
        $msg['field'] = "phone";
        $msg['code'] = FALSE;
    }
} else if (!preg_match("/^[0-9 \\-\\+]{4,17}$/i", trim($phone))) {
    $msg['err'] = "\n Please put a valid phone number!";
    $msg['field'] = "phone";
    $msg['code'] = FALSE;
} else if ($website == "") {
    $msg['err'] = "\n Website can not be empty!";
    $msg['field'] = "Website";
    $msg['field'] = "website";
    $msg['code'] = FALSE;
} else if ($_message == "") {
    $msg['err'] = "\n Message can not be empty!";
    $msg['field'] = "Message";
    $msg['field'] = "message";
    $msg['code'] = FALSE;
} else {
    $to = 'myemail.com';
    $subject = 'Email- Contact Request Quote';
    $message = '<html><head></head><body>';
    $message .= '<p>First Name: ' . $fname . '</p>';
    $message .= '<p>Email: ' . $email . '</p>';
    $message .= '<p>Phone: ' . $phone . '</p>';
    $message .= '<p>Website: ' . $website . '</p>';
    $message .= '<p>Message: ' . $_message . '</p>';
    $message .= '</body></html>';
    $headers = 'MIME-Version: 3.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From:  '.$fname.'<'.$email.'>' . "\r\n";
    $headers .= 'cc: personalgmail.com' . "\r\n";


    mail($to, $subject, $message, $headers);

    $msg['success'] = "\n Email has been sent successfully.";
    $msg['code'] = TRUE;
}

echo json_encode($msg);

I have this issue, it sends directly to junk but gmail works fine... its very weird i tried many configurations but no use.

I checked logfiles and all is fine and it send correctly but outlook online just filters it like that whenever i receive something.

It says unverified sender but if i send directly from gmail to outlook it works fine.

Javascript - A problem with the validation of my form

$
0
0

I have a problem with the validation script of my php form to send an email, and although it works very well to validate the form, when the user clicks on the "accept" button of the alert, the script does not block the action, and the form is sent anyway...

What am I doing wrong?

Thanks in advance!

HTML:

<div id="form">
 <section>
  <form action="send.php" method="post" accept-charset='UTF-8'>
  <label for="email"></label>
  <input id="email" type="email" name="email" maxlength="50">
  <input type="hidden" name="privacy" value="blahblahblah"/>

  <input id="submit" type="submit" name="submit" value="SEND" onclick="validate(this);">

  </div>
  </form>
 </section>
</div>

SCRIPT (validation):

function validate () {
    var email;
    email = document.getElementById("email").value;
    expresion = /\w+@\w+\.+\w/;

if(email === "") {
    alert("You cannot submit this request. You must give us an email");
    return false;
    }

else if (email.length>50) {
    alert("The maximum for email is 50 characters");
    return false;
    }

else if (!expresion.test(email)) {
    alert("Check your information. The email format is not valid");
    return false;
    }
}

Email sending using SMTP not working with asp.net

$
0
0

I'm trying to send email using SMTP in asp.net. Following code is not working.

public string send_email(string name, string email, string message)
{
    var fromAddress = email;
    var toAddress = "ashish_sharma307@hotmail.com";
    string subject = "Feedback";
    string body = "From: " + name+ "\n";
    body += "Email: " + email + "\n";
    body += "Subject: " + subject + "\n";
    body += "Question: \n" + message + "\n";
    // smtp settings
    var smtp = new System.Net.Mail.SmtpClient();
    {
        smtp.Host = "smtp.live.com";
        smtp.Port = 587;
    }
    smtp.Send(fromAddress, toAddress, subject, body);


    return "Your query has been submitted.";
}

This is not working as per expected. I'm trying to send an email from feedback form.

How to send an email notification when PowerShell script gets an error?

$
0
0

I have a PS script that works automatically on task scheduler, at the end of the script there is an email confirming that the script was successful, if the script gets one error during its process the script stops ($ErrorActionPreference = "Stop"), this avoids the script to get to the point when the confirmation email is sent. But, I cant send an email when there is an error to notify someone about this error.

What can be a solution for this?

Thank you!

Wordpress email not working on form submission [duplicate]

$
0
0

This question already has an answer here:

I do not receive mail from my WordPress site. I used contact form 7 and properly set the SMTP configuration settings(set From Email Address just like my domain). when I try to test email everything looks good. I've got this message "Test email was successfully sent" and I receive test mail in inbox. But when I fill out the form on the site and click submit then I don't get any mail.

enter image description here

How to get billing address in order ID woocommerce as recipient for autoresponder?

$
0
0

We have an autoresponder which send thank you email for order status changed to completed. The autoresponder is firing but it is sending the email to all the subscribers in the list. We can't seem to figure out the right code to send it to the billing email only of the order who just got completed. We believe our code is wrong which results to null which results to sending to all subscribers.

We tried hundreds of codes already. This is the closes code I feel like we're getting to the right recipient.

function trigger_autoresponder($order_id, $data) {     
    $email = get_post_meta( $order_id, '_billing_email', true );
    do_action( 'my_custom_hook', $email );    
}

// add the action 
add_action( 'woocommerce_order_status_completed', 'trigger_autoresponder', 10, 1 );

We expect the autoresponder email will send the thank you email to the billing email address of the order that was changed to "completed" order status.

Nomutt thread all messages as the default

$
0
0

The out-of-the-box default for neomutt is to have all email conversations unthreaded. ESC-V will thread them all, but the default keeps coming back. Is there a way to set the thread all as a default on .muttrc?

Viewing all 30013 articles
Browse latest View live


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