I have never used power shell before but my understanding is that it is best way of sending email on windows machine .
My network has provided me following details
SMTP sever
Port
Authentication : Anonymous
From :
To:
Now when I am looked and researched internet I found we need username and password for sending email.
Is there any way I can send email using anonymous authentication with only server name provided and also include atatchment
Thanks in advance
The mail server will do an anonymous relay depends on the configuration of the Recieve Connectors.So, Run the Send-MailMessage on the Exchange server and use 'localhost' as your SMTPServer, then it won't go through a receive connector.
Note: Your email user should exist and part of a valid domain.Then you can send from noreply# or whatever you want to use.
send-mailmessage -From "noreply#example.com" -To "user01#example.com", "user02#example.com" -Bcc "user03#example.com" -Subject "Anonymous Mail Subject" -Body "Anonymous test Body" -SmtpServer 'localhost' -Port 25
*Note:*25 is the default smtp port.
Related
I have installed smtp pro from mangento connect manager,configured for my general settings for custom smtp.
When I go to my sales > order and send order email, I get message "email sent", though I don't receive any email.
while I run the test I get the error message:
"Exception message was: 5.7.1 Client does not have permissions to send as this sender."
Is this message from the mail server? Or have I done something wrong with extension setup itself?
Help would be appreciated.
That's coming back from your SMTP server - looks like it's restricting the
"from:" header values.
You would need to configure "Send As" permission on your mail server to allow your agent accounts to send email as your outbound mailbox account.
Below are instructions on how to do it in some of the more common email server/providers.
Exchange 2007 &2010
http://technet.microsoft.com/en-us/library/bb676368%28v=exchg.141%29.aspx
Office365:
http://support.microsoft.com/kb/2572646
Google Apps:
https://sites.google.com/a/apu.edu/gmail-for-apu/executive-assistants/send-on-behalf
Hi all I have a site where if i want to send an email I have to set the smtp with this configuration:
Enable Advanced Smtp Yes
Auth Mode Login
Username noreply#myserver.com
Password password
Smtp host smtp.myserver.com
Smtp port 465
Use SSL Yes
If I want to send with my smtp settings mail from another address like test#test.it how can I do that? Because my client don't want to see my domain when receive the email but another email.
Is possible?
All you need is an SMTP server with relaying. if smtp.myserver.com has relaying, than you can use a variety of languages. YOu need to modify the >MAIL From: parameter in any which of those languages.
For magento, modify: “/magento/app/code/core/Mage/Core/Model/Email.php"
then under the
public function send() function you need to modify:
->setFrom($this->getFromEmail(), $this->getFromName())
and use
->setFrom("test#test.com")
I am trying to send emails from a powershell 2.0 script. Messages send to other recipients on my domain are properly delivered, but external domains cannot receive the messages. I have tried passing the external email address to send-mailmessage as a string, as an array, and explicitly as the only argument for that class of recipient, and the message doesn't go out. I am relaying off an SMTP connector I added to my Exchange 2007 server. Any ideas? I get an error message back that says "Unable to send to a recipient'
Send-Mailmessage <<<< -To $testto -From $Mailfrom -Cc $testcc -Subject "..." -Body "..." -SmtpServer "x.x.x.x"
+CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-Mailmessage], SmtpFailedRecipientsException
+FullyQualifiedErrorID : SmtpFailedRecipientsException,Microsoft.PowerShell.Commands.SendMailmessage
Is this a resolution error? I am using a gmail account as a test recipient.
Thanks for the info- I started researching Exchange 2007 and I have gotten relaying to work properly. What you need to do is to edit the properties on the Receive connector that you relay your SMTP messages with. Set the Permission Groups to Exchange servers and Anonymous Users, and set the Authentication to Externally Secured. This enabled the script to send the messages externally as well as internally. As always, remember to follow best practices for security and research topics like this thoroughly before attempting them.
I want to send email in Drupal 7. So, does anyone know how to configure Gmail SMTP on Drupal 7?
Download SMTP module and enable it.
Go to Admin > Configuration > SMTP authentication support and set the following values:
Turn on the module at the Install options fieldset at the top.
SMTP server settings:
smtp server: smtp.gmail.com
smtp backup server: leave blank.
smtp port: 465
use encrypted protocol: select "use SSL"
SMTP authentication:
Enter a valid Gmail email address and password.
Email options:
Set the same email address that you used at SMTP Authentication. Using a different account is called Phishing
Send test email: set an email to receive a sample email.
Enable debugging: yes.
3. Click on submit and verify that the email was submitted and that you received it. If not, read carefully the debug information at the top of the screen. Once satisfied, remember to deactivate the debug checkbox.
Step 1: Download SMTP module and enable it.
Step 2: Go to Admin > Configuration > System > SMTP authentication support and set the following values:
Turn this module on or off: On.
SMTP server settings:
smtp server: smtp.gmail.com
smtp backup server: leave blank.
smtp port: 465
use encrypted protocol: select "use SSL"
SMTP authentication:
Enter a valid Gmail email address and password.
Email options:
Set the same email address that you used at SMTP Authentication.
Send test email: set an email to receive a sample email and to test whether the module is working.
Enable debugging: yes.
Step 2a(Optional): Allow Less Secure Apps Access which is here: http://www.google.com/settings/security/lesssecureapps
Step 3: Click on Save and go to your inbox to check. If there is an testing email then it is fine.
Note: Your email address provided in your smpt setting MUST be the same like in your site information.
I hope SMTP Authentication Support module will help you.
For me, just following the steps in Juampy's answer didn't work. The error "Unable to send mail. Contact site administrator." continued to display. Do the following first and then configure SMTP module as per his answer.
Before installing SMTP module, download PHPMailer and extract it. Rename the folder as 'phpmailer' and copy the folder into module folder of SMTP module. Then, install the SMTP module.
An alternative configuration is as follows:
smtp port: 587
use encrypted protocol: select "use TLS"
This blog entry has some more up-to-date info:
http://www.stevepolitodesign.com/blog/drupal-configure-smtp-module-work-gmail-updated
Install and set-up module:
Install the SMTP Authentication Support module in the usual way.
Navigate to the configuration page admin/config/system/smtp
Under Turn this module on or off select On. You can leave Send mail
by queue and Retry sending mail on error. deselected by default, but
selecting them won't affect Gmail.
Under SMTP server enter the following smtp.gmail.com. Leave SMTP
backup server blank
Under SMTP port enter 587
Under Use encrypted protocol select Use TLS
Under SMTP AUTHENTICATION enter a Gmail address and password.
Under E-MAIL OPTIONS use the same Gmail address as you did above and
enter an E-mail from name
Click Save
Update gmail account settings:
Login to your Gmail account at https://myaccount.google.com/
On the account homepage, click Sign-in & security or navigate to https://myaccount.google.com/security
Scroll down to the Allow less secure apps: widget, and have it enabled.
Now navigate to https://accounts.google.com/DisplayUnlockCaptcha and click Continue
Go back to the SMTP configuration page admin/config/system/smtp
Enter an email address you would like to receive a test message from and click Save configuration
Check your inbox to confirm you received the test message.
This is quite a specific question, and I have had no luck on the grails nabble forum, so I thought I would post here. I am using the grails mail plug-in, but I think my question is a general one about using authsmtp as an email gateway from my server.
I am having trouble sending mail from my app using authsmtp. I have installed and configured the mail plugin and was originally using my ISP's SMTP server to send mails. However when I deployed to AWS EC2 this failed because my elastic IP was blocked by the SMTP host. So I bought myself an authsmtp account and set up my server email address as an accepted one at authsmtp.
I then changed my configuration in SecurityConfig.groovy to point to the authsmtp server that I had been designated...
mailHost = "mail.authsmtp.com"
mailUsername = "myusername"
mailPassword = "mypassword"
mailProtocol = "smtp"
mailFrom = "valid-authsmtp-address#mydomain.com"
mailPort = 2525
...and I'm just trying to get this to work locally before I deploy back up to AWS. Sending mail fails and in my log I have this exception:
2010-02-13 10:59:44,218 [http-8080-1] ERROR service.EmailerService - Failed to send emails: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 513 5.0.0 Your email system must authenticate before sending mail.
org.springframework.mail.MailSendException; nested exception details (1) are:
Failed message 1:
com.sun.mail.smtp.SMTPSendFailedException: 513 5.0.0 Your email system must authenticate before sending mail. at
com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
I'm a bit lost since the username and password I provide in the
configuration are definitely correct.
A terse and not very helpful conversation with authsmtp support suggests
that I need to MD5 and/or base64 encode my credentials before sending, so my
question is in three parts...
1) any idea what's going on with the failure and why that message is
appearing?
2) how would I encode the credentials to pass to authsmtp and how would I
configure that for the mail plugin
3) has anyone successfully connected and sent mail through authsmtp from the
mail plugin and specifically from AWS EC2?
When sending Email using the Acegi plugin, under the hood a Spring JavaMailSenderImpl is used. Looking at its docs:
Note that the underlying JavaMail Session has to be configured with the property "mail.smtp.auth" set to true, else the specified password will not be sent to the mail server by the JavaMail runtime. If you are not explicitly passing in a Session to use, simply specify this setting via setJavaMailProperties(java.util.Properties).
So append to your SecurityConfig.groovy the following:
javaMailProperties = [ "mail.smtp.auth": true]
I didn't find a solution to this using the Grails mail plugin, so I'm still interested in an answer, however I did find a workround. It may be useful in case anyone else follows me down this lonely path.