I've been struggling with it for a couple of days myself, and finally found a solution.
In Automator, I made a simple three step Application that waits for a few seconds (using "Pause") before trying to connect to the network share. I believe the problem is related to the (in my case wireless) network connection not being completely established when the login items run immediately after login.
The Application consists of three steps:
- Pause for 5 seconds
- Get specified Servers "smb://HOSTNAME/SHARENAME"
- Connect to Servers
HOSTNAME and SHARENAME should be replaced with your own parameters. The choice of 5 seconds is arbitrary (and probably is likely dependent on one's own specific conditions) but it works on my own Mac Mini 2011.

Please note that running this script only works when the network share is not already connected, you need to unmount before running the application for testing purposes.
Update: Now that I've had a few days of experience with this script I've found that it works sometimes and sometimes not, my guess is still that the wireless network isn't ready to connect and that it fails because of that. The reasons why are unclear to say the least, increasing the Pause timer duration definitely helps though.