I am trying to create MIME message using phpmailer().
Everything works fine but Bcc field is missing when I read the MIME message.
I am using below technique to create MIME Message.
$mail->preSend();
$mime = $mail->getSentMIMEMessage();
The MIME message created by the above code is used in some other app to send email.
TO and CC field works fine but Bcc field is missing.
Kindly tell me where I am wrong.
Kindly let me know you are not able to get my question.
Happy to share more info.
Er, you do know what BCC does, don't you? BCC is typically removed by an MTA, otherwise it wouldn't be blind, and PHPMailer is effectively an MTA.
Related
I am using NSWorkspace to set TO, CC, BCC , SUBJECT and body text in default mail application through my application. How can i add attachments using NSWrokSpace?
Is there any way to attach files in the default mail app using NSWorkSpace?
I have tried using NSSharingService but problem with NSSharingService is that you cannot set CC and BCC email addresses in the default application Email Compose.
Is there any way to add CC, and BCC recipients using NSSharingSerivce ??
or is there any way to add attachments in mail using NSWorkSpace??
My code to open and set TO, CC and BCC is here
NSWorkspace.sharedWorkspace().openURL(NSURL.init(string:"mailto:(self.txtTo.stringValue)"+"?subject=YourSubject"+"&cc="+self.txtCC.stringValue+"&bcc="+self.txtBcc.stringValue)!)
And Using NSSharingService i can set only recipients as TO
service!.recipients = [self.txtTo.stringValue]
service!.subject = "Subject"
thanks!.
It looks like NSSharingService has the method performWithItems, which takes an array of the things you want to share.
It appears you can create a sharing service of type NSSharingServiceNameComposeEmail and then attach a message body and a file to attach.
I've never used NSSharingService before, so the above is based on some Googling and reading the docs. (And I mostly work in iOS these days so my Mac OS is getting a little stale.)
Check out this link:
http://cutecoder.org/featured/programmatically-sending-rich-text-mail-attachment-mac/
I have a problem with attached file attached in outlook email sent by the console business objects,
his name was prefexé ISO-8859-1Q which causes me a problem opening it.
Need help to evolve. thank you
Sounds like the Filename attribute of the Content-Disposition MIME header included an invalid charset value.
How exactly is the message created and received?
I am using the latest Joomla build for my website.
Allso we use a DNS record for having the mail delivered to our own server instead of the server on which the website is hosted.
I have used several contact form components, but every sent mail goes to my SPAM folder.
After searching hours on the web (and getting linked to this site frequently) i decided to make a new post.
It does not matter if i use the standard joomla forms, or any component.
Whenever a user fills in a form on my website, the email gets sent. The user receives a copy of its message, and i receive the message of the user. However, this message gets thrown in the spam folder, as phishing.
The sender of the mail always is: username#nameserver.i3d.net; namens; websitename
What do i have to change/enable/disable for this to work?
Thanks in advance.
Patrick.
(Sorry, I'm new to Joomla, but it uses PHP, so this may apply. Also this answer got a little long...)
It might be an issue with the email headers. A lot of email clients will automatically spam-box all mail where the address in the From: header doesn't match the envelope sender. As an analogy, you might not trust a snail-mail letter signed "Your Rich Uncle", mailed in an envelope with a Nigerian return address. Also if your envelope sender has a different domain than the one the email is actually sent from, that's another quick ticket to the junk bin. For more info about Gmail's message blocking policies (and general good practices), you can try this help page.
Here's some basic PHP email-sending code:
$to = $userEmailAddress;
$subj = $emailSubject;
$mesg = $emailMessage;
$headers = implode("\r\n",array(
"MIME-Version: 1.0"
,"Content-type: text/html;charset=iso-8859-1"
,"From: WEB_ADMIN_NICE_NAME <WEB_ADMIN#YOURSERVER.COM>" // *** 'From:' header
));
$from = "-fWEB_ADMIN#YOURSERVER.COM"; // *** envelope sender
if(!mail($to, $subj, $text, $headers, $from)){
//Some error handling...
}
On the first line I commented, you'll want to replace WEB_ADMIN_NICE_NAME with the name you want the email recipient to see (e.g. "Bill Gates"), and on both lines, replace WEB_ADMIN#YOURSERVER.COM with the actual return address (e.g. "da_boss#microsoft.com"). Note: whatever address you choose for the return address is where users' replies will be sent.
To reiterate, make sure both lines have the same return address (though the nice name can be anything you like), and make sure that the actual server sending the mail is in fact located at YOURSERVER.COM.
Lastly, I'm not sure where Joomla does its mailing, but if you're totally lost, you can try grepping with -lr for 'mail[[:space:]]*('.
there are several reasons that could make your email look suspicious to spam filters; to find out which head on to:
http://www.mail-tester.com
grab the email address and send an email from your website to it.
Then go back to the page and it will tell you what's wrong.
btw I'm struggling with the same issue,my problem being that on Joomla 2.5.9 apparently when you send html emails, a text-only copy is not added to the message, which is considered "spammish behaviour"
The problem is the i3d.net email address. My personal experience is that their network (31.204.154.0 - 31.204.155.255) is a significant source of spam and they do not action abuse reports. I suggest changing your hosting company.
I've same problem like here. But still not able to solve it.
I've followed steps from here. but doing so doesn't sends mail.
The log file says: Mail is sent. but at the other side mail is not received.
Any ideas why?
Check your SMTP settings and make sure you have defined the right settings for your e-mail host. If you are using a sender e-mail other than Gmail then your settings will be different to the ones used in the Railscast.
The file to check is here: config/initializers/setup_mail.rb.
Edit: It still may be possible that the settings you used in jsp may not match perfectly with the 'phrasing' that Rails expects in the setup_mail.rb file. I have frequently come up against this problem where a slight difference in what SMTP settings you mention / don't mention / how they are worded will determine whether the e-mails send/receive or not.
If your logs show the e-mail is sending to a valid e-mail address (and you are not receiving those e-mails in your inbox or spam filter) then the problem, as far as I know, is most likely to be your SMTP. My advice is to check online for the Rails-specific SMTP settings for your e-mail provider, or in the case that you cannot find them, try different combinations until you find the correct one.
Okay the problem is solved. Problem was my file corresponding to action was not at proper place. Here is quick view on how to do it:
Add following to actionmailer:-
def send_mail
attachments['1.pdf'] = File.read('c:/1.pdf')
mail(:to => "harsh#xyz.com", :subject => "xyz", :from=>"harsh#xyz.com")
mail.deliver
end
Notes:- Make sure that the smtp settings are correct and the file corresponding to the action (In this example send_mail.rhtml) is present under appropriate folder.
I use Net::SMTP to automate emails. I want to get notification if someone use email into Outlook I used this:
$smtp->datasend("Disposition-Notification-To: to.me\#domain.com");
The email sent succesfully but the Outlook client is not getting the notification.
Here is a snippet of the code:
$smtp = Net::SMTP->new("my mail host");
$smtp->mail("my\#adress.com);
$smtp->to("someuser#domain.com");
$smtp->data();
$smtp->datasend("Disposition-Notification-To:my\#adress.com");
$smtp->datasend("blah balh");
$smtp->datasend();
$smtp->quit;
The Net::SMTP module is pretty low level for this sort of stuff. You'd have an easier time with a higher level module such as Email::Sender.
It's possible the Outlook client agent is not set up properly to listen for these events. Can you send mail to it via another method? You need to isolate whether it is the listener or the sender that is having problems.
If you can receive mail in Outlook, but just not from your code, then it's your code at fault. Please include more contextual code in your question -- e.g. how is the $smtp object being constructed? Are you making a $smtp->dataend(); call as per the documentation?
Edit (after you included some code): there is a typo in that code; are you using use strict; use warnings; at the top of your script or module? Can you receive mail to your client from other means?
Edit2: if notification is all you're lacking, you should probably dive into the Outlook documentation to see what the criteria are for receiving such notification. e.g. you might need to provide a valid "Date:" header.
You need to include a blank line between the last header and the actual body of the message.
You also seem to be missing a space after the header prefix.
I'd guess that one of these is stopping Outlook from interpreting the header correctly.
Try this:
$smtp->data();
$smtp->datasend("From: my\#address.com");
$smtp->datasend("To: my\#address.com");
$smtp->datasend("Subject: test mail");
$smtp->datasend("Disposition-Notification-To: my\#adress.com");
$stmp->datasend("\n");
$smtp->datasend("blah blah");
$smtp->dataend();
$smtp->quit;
Perhaps Outlook is requiring the Return-Receipt-To header (non-standard, but you are sending to Outlook, afterall).