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

Silverstripe Email Config [closed]

$
0
0

Silverstripe Email Config

Hi friends i have one doubt about email config please anyone tell about Step by Step process this more helpful for me…

I am create one Contact us Form. The user fill the contact form then click sumbit button send email for admin and also user please help me…

Advance thanks


Decryption Outlook Certificate Encryption mail on Android device use Certificate

$
0
0

I am developing a mail client on Android, so I need decryption mail send from an Outlook client use Certificate to signature and encryption, I have import user certificate on the phone and I have read user's public key and private key. I also read the rfc-1991 about pgp, but I can not decrypt the encryption mail, so I want to know if Outlook encrypt mail flow the pgp specification. I also found that the Samsung device system mail client can decrypt Outlook encryption mail, or is there any docs about how outlook client encrypt mail?

Can I receive email at a dedicated server without domain name?

$
0
0

I have a dedicated server at some ip address, but it has no domain name. Can I still somehow receive email at that server? If so how?

If that's impossible are there other solutions? Can I configure an email server to forward by sending an http request? Or by running a local script which can handle the http request to the dedicated server?

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 3.7.5 - snmplib - SMTP method is showing error

$
0
0

I am trying to write a script which can send email from my gmail account. However I am getting error mentioned below. I am using windows10 64bit. It looks like a SSL error but unable to find any solution for this -

import smtplib
smtpObj = smtplib.SMTP('smtp.gmail.com', 587)

**Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    smtpObj = smtplib.SMTP('smtp.gmail.com', 587)
  File "C:\Users\SDE44\AppData\Local\Programs\Python\Python37\lib\smtplib.py", line 251, in __init__
    (code, msg) = self.connect(host, port)
  File "C:\Users\SDE44\AppData\Local\Programs\Python\Python37\lib\smtplib.py", line 336, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "C:\Users\SDE44\AppData\Local\Programs\Python\Python37\lib\smtplib.py", line 307, in _get_socket
    self.source_address)
  File "C:\Users\SDE44\AppData\Local\Programs\Python\Python37\lib\socket.py", line 727, in create_connection
    raise err
  File "C:\Users\SDE44\AppData\Local\Programs\Python\Python37\lib\socket.py", line 716, in create_connection
    sock.connect(sa)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions**

Amazon SES, verification mail - PHP - Conditiional

$
0
0

When I connect to my app, I receive a verification email, but my email address is already verified. What condition should I use so that when the email adress is verified it does not send the verification email? Thank you so much. This is the code :

 public function verifyContactEmailAmazonSes() {

$domainName = Str::after(request('domain'), 'http://');
$domainName = Str::after($domainName, 'https://');

$sesClient = new SESClient([
    'version' => '2010-12-01',
    'region' => 'eu-west-1',
    'credentials' => [
        'key' => config('aws.key'),
        'secret' => config('aws.secret'),
    ],
]);
$sesClient->verifyEmailIdentity([
    'EmailAddress' => 'contact@'.$domainName,
]);

return response()->json([
    'status' => true,
    'message' => '',
]);

}

Limit G Suite Outgoing mail to N recipient

$
0
0

I'm trying to create a routing rule, which through a regular expression can block the sending of an email if the recipients (To: Cc: and Bcc :) exceed a certain limit

e.g.

(^To:(.*@.*)+(\n|\r\n|\r)|^Cc:(.*@.*)(\n|\r\n|\r)|^Bcc:(.*@.*)(\n|\r\n|\r)){4,}

MIME-Version: 1.0
Date: Mon, 2 Dec 2019 18:51:05 +0100
Message-ID: <msgID-00000-11111-22222A@mail.gmail.com>
Subject: Test
From: Name <email@example.com>
To: Name <email@example.com>, Name <email@example.com>
Cc: Name <email@example.com>
Bcc: Name <email@example.com>
Content-Type: multipart/related; boundary="00000000000046fe3e0598bc3916"

the problem of this regular expression is that the count of occurrences limited to the fields: To, Cc and Ccn stops at the first value found in each row, so it would only match if I change to {3,}

I can not however count email addresses in a header without limiting to those fields, otherwise I could find several email addresses scattered in the header, like msgId, inside the body or in the signature

How to configure and debug Mercurial NotifyExtension?

$
0
0

The task is: Setup Mercurial on the production server to push email notifications on an email address when someone pushes a new commit from their PC to the repo.

So I'm trying to configure and test NotifyExtension on my local repository. I'm testing HG SERVE to check if I'm getting any emails.

What I tried so far:

[paths]
default = https://source.server.com/hg/repo-name

# path aliases to other clones of this repo in URLs or filesystem paths
# (see 'hg help config.paths' for more info)
#
# default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
# my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
# my-clone        = /home/jdoe/jdoes-clone

[ui]
# name and email (local to this repository, optional), e.g.
# username = Jane Doe <jdoe@example.com>

[extensions]
notify=

[hooks]
changegroup.notify = python:hgext.notify.hook
incoming.notify = python:hgext.notify.hook
outgoing.notify = python:hgext.notify.hook

[email]
from = Name Lastname <name.lastname@server.com>

[smtp]
host = mail.server.com
username = name.lastname@server.com
password = mypasswordstring
port = 465
tls = true

[web]
baseurl = https://source.server.com/hg

[reposubs]
* = name.lastname@server.com

[notify]
sources = serve push pull bundle
test = False

[ui]
debug = True

Might be obvious to someone, but it's not sending any emails.

Running in my repository:

hg help

returns that notify extension is enabled but I'm not getting any emails.

  1. Do I need any software other than Mercurial installed? (Running Ubuntu 18.04.2 LTS locally)
  2. Is there any place I can check for logs?
  3. What could be wrong in my configuration?

Thanks in advance.


Is it possible to create api endpoints using plain python? [closed]

$
0
0

I need to create api endpoints using plain old python. If its possible, could i see a sample code?

as_string() method return an AttributeError

$
0
0

I try to send message from gmail with python 3.6 by this part of code:

import smtplib as smtp
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
import os

SUBJECT = *subject message*
SOURCE = *directory*
TEXT = *some text in message*

msg = MIMEMultipart()
msg['From'] = *send from email*
msg['To'] = *send to email*
msg['Subject'] = SOURCE

#################### part with attachment
msg.attach(MIMEText(TEXT, 'plain'))
filename = os.path.basename(SOURCE)
attachment = open(SOURCE, 'rb')
part = MIMEBase('application', 'octet-stream')
part.set_payload(attachment.read())
encoders.encode_base64(part)
part.add_header('Content-Disposition', 'attachment; filename = %s'%filename)
msg.attach(part)
#################### end of attachment part

#################### server part
server = smtp.SMTP(smtp.gmail.com', 587)
server.starttls()
server.login(*send from email*, *send from email password*)
server.sendmail(*send from email*, *send to email*, msg.as_string())
server.close()

But get an AtributeError:

AttributeError: 'list' object has no attribute 'encode'

If i delete Attachment part of code and add msg = MIMEText(TEXT) before server part i get an letter in my email, but it doesn't contain subject. So i get a letter with some text only.

What i do wrong? Any thoughts?

EDIT: The error appears in msg.as_string() line

Validate email with Javascript functions and alerts

$
0
0

Trying to get a code to validate an email but doesn't work. Have no ideas. Please help. I cannot get this code to validate

<!doctype html>
<html>
<body onload="check_user_age()" style="position:absolute">
    <h1>Spiritueux Wines and Liquors</h1>
    <script>
        function check_user_age(){
            if (age_of_user() < 18)
                alert("You are too young to buy alcohol.");
        }

        function age_of_user(){
            var age = prompt("What is your age?");
            return age;
        }
        var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
        var email_of_user = prompt("Enter your email");
        if(email_of_user.value(mailformat)){
            alert("You email is valid");
        } else {
            alert("Your email is not valid");
        }
    </script>
</body>
</html>

Emails not being sent after WooCommerce latest update

$
0
0

Emails aren't being sent after an order is removed from "On Hold" to "Processing"

I've installed WP Mail Logging Log and no email is showing. Also installed easy Easy WP SMTP.

Also how can all emails sent from the system not go to SPAM?

Any ideas?

Node.js How to create email accounts (Disposable) dynamically & receive emails through them?

$
0
0

I'm going to create disposable emails dynamically using Node.js and receive the emails through those emails. I have my own domain which is purchased on Wix. Needs to create hundreds of emails based on this domain and use it to receive emails.

Can someone guide me how to achieve this, please?

Thanks.

Whitelisting in Postfix smtpd_*_restriction

$
0
0

unfortunately i try to configure the whitlisting in the smtpd_(client|sender|recipient)_restrictions without success so far. The basic spam protection is quite restrictive and for certain clients, senders and recipients I want to skip some checks. Nevertheless, these mails go through the following processes, here explained by the example of smtpd_client_restrictions:

smtpd_restriction_classes = permissive, …

permissive = permit

smtpd_client_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unknown_client_hostname,
    reject_unknown_reverse_client_hostname,
    check_client_access mysql:/etc/postfix/conf/wl_clients.cf,
    check_client_access mysql:/etc/postfix/conf/bl_clients.cf,
    check_client_access cidr:/etc/postfix/conf/postfix_client_access.cidr,
    check_policy_service unix:private/policyd-spf,
    check_policy_service inet:192.168.164.1:12525,
    pcre:/etc/postfix/conf/postfix_prepend-clientIP.pcre

In the table of wl_clients.cf, for example, the client "provider.tld" has the action "OK" or "permissive" and the mails are still checked by the policyd-weight, which I actually want to avoid for them. For the corresponding clients everything should be done with an OK in the smtpd_client_restrictions and then they should go through the smtpd_sender_restrictions and smtpd_recipient_restrictions.

It also doesn't work if I put everything concerning white-/blacklisting into the smtpd_recipient_restrictions. The mails go through all steps up to the further transport. Strangely enough, the REJECT works without any problems. Do I use a wrong keyword or is the concept not set up correctly? Thank you very much for your help!

Odoo [12] : How to Create Chatter same like Send Message?

$
0
0

How to Create Chatter same like Send Message, Log note and Schedule activity. if you know how to do it please let me know.

Thanks in Advanced


Setting Low Disk Space Alerts on Windows Server 2008 [closed]

$
0
0
  1. Open Task Scheduler and create a new task.

  2. Enter a name for the task, select "Run whether user is logged on or not", and check "Do not store password."

  3. Add a new trigger on the Triggers tab.
  4. Select "On an event" in the "Begin the task" box.
  5. Set Log to "System", Source to "srv", and Event ID to "2013".
  6. Add a new action on the Actions tab.
  7. Set Action to "Send an e-mail" and fill in the rest of the settings appropriately.

To configure when the low disk space event is recorded in the System Log, open the Registry Editor, navigate to HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters and add a DWORD value named “DiskSpaceThreshold”, setting it to the desired percentage. When the entry does not exist, the default value is 10.

How to read email content in Python 3

$
0
0

I've tried many code to access and read email content, for example, about Gmail i only can do authentication and with Outlook i have code that can read email but it's encrypted...but now it only access email and doesn't output with encrypted information. So i need help to solve this. Thanks

Here's the code:

import imaplib
import base64 

email_user = input('Email: ')
email_pass = input('Password: ')

M = imaplib.IMAP4_SSL('imap-mail.outlook.com', 993)
M.login(email_user, email_pass)
M.select()
typ, data = M.search(None, 'ALL')
for num in data[0].split():
    typ, data = M.fetch(num, '(RFC822)')
    num1 = base64.b64decode(num1)
    data1 = base64.b64decode(data)
    print('Message %s\n%s\n' % (num, data[0][1]))
M.close()
M.logout()

send an automatic mail notification in java [duplicate]

$
0
0

This question already has an answer here:

I am new with jsp. I am learning some new things related to programming. I have done coding till one or multiple files are uploading into my MySQL database. now I want to send an email notification immediately to respective user who uploads files into database(I have "Mail ID" column in my database). I searched on this but didn't get any solution. I am using netbeans 8.2, tomcat 8, XAMPP server with MySQL database.

Trying to return a valid email from a function [closed]

$
0
0

I'm writing a JS function that prompts the user to enter an email address. I want to confirm that the user input is an email address by checking if an '@' sign exists within the input. Then I want to return the email address if it's true.

My python knowledge has me writing this line, "if at == true return email", but the console is returning a syntax error. Any ideas? Code below:

function email_of_user() {
        var email = prompt("What is your email?");
        var at = email.indexOf("@");
            if at === true return email
      } 

PS. This is code is within an HTML doc, rather than a standalone JS file.

Danish character ø in email adress

$
0
0

For years, I receive emails on my outlook email adress, which obviously do belong to a person with a almost identical name and email-adress as mine. The only difference is the ø in his name and a regular o in my name.

This email adress in question is an alias synced with my main email. As far as I understand the character ø is not allowed in email adresses, so I am more than confused what this means. I assume this person in Denmark has an email adress, maybe with an ø but maybe with an o inside , and most likely is using this adress actively being able to read, write and reply.

So why am I constantly receiving at least some of his mails? How is it possible that outlook allows for several identical mail adresses? Is it a different adress/ account for outlook but the same for all the senders to this mail adress?

Viewing all 29743 articles
Browse latest View live